Changeset 73 for trunk/WordPress/plugin/transposh/transposh.php
- Timestamp:
- 03/19/2009 12:38:08 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/transposh.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/transposh.php
r72 r73 228 228 $translated = NULL; 229 229 logger("Enter " . __METHOD__ . ": $original", 4); 230 logger("Original was: $original", 3); 230 231 $original = $wpdb->escape(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8')); 231 232 logger("Original is: $original", 3); … … 393 394 } 394 395 396 /* 397 * Helper function for annoying strings from php escape (%u2019) 398 */ 399 function utf8_urldecode($str) { 400 $str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str)); 401 return html_entity_decode($str,null,'UTF-8');; 402 } 395 403 396 404 /* … … 422 430 //Decode & remove already escaped character to avoid double escaping 423 431 // TODO: remove logging? 424 logger("orig:" .$original,4); 425 $original = $wpdb->escape(stripslashes(urldecode(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8')))); 432 logger("origwas:" .$original,4); 433 $original = utf8_urldecode($original); 434 logger("orig2:" .$original,4); 435 $original = $wpdb->escape(stripslashes(urldecode(html_entity_decode($original, null, 'UTF-8')))); 426 436 logger("orig:" .$original,4); 427 437 $translation = $wpdb->escape(htmlspecialchars(stripslashes(urldecode($translation))));
Note: See TracChangeset
for help on using the changeset viewer.
