Changeset 778160
- Timestamp:
- 09/25/2013 07:05:01 AM (13 years ago)
- File:
-
- 1 edited
-
post-by-email/trunk/class-post-by-email.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
post-by-email/trunk/class-post-by-email.php
r777233 r778160 679 679 $content = trim( $content ); 680 680 681 // fix for which get turned into unicode and destroy everything 682 $content = str_replace( chr( 0xA0 ), ' ', $content ); 681 // fix up special characters which get turned into unicode and destroy everything 682 // via http://stackoverflow.com/questions/12007613/devilish-curly-quotes 683 684 // First, replace UTF-8 characters. 685 $content = str_replace( 686 array( 687 "\xe2\x80\x98", 688 "\xe2\x80\x99", 689 "\xe2\x80\x9c", 690 "\xe2\x80\x9d", 691 "\xe2\x80\x93", 692 "\xe2\x80\x94", 693 "\xe2\x80\xa6", 694 ), 695 array( "'", "'", '"', '"', '-', '--', '...' ), 696 $content 697 ); 698 699 // Next, replace their Windows-1252 equivalents... and non-breaking spaces 700 $content = str_replace( 701 array( chr( 145 ), chr( 146 ), chr( 147 ), chr( 148 ), chr( 150 ), chr( 151 ), chr( 133 ), chr( 0xA0 ) ), 702 array( "'", "'", '"', '"', '-', '--', '...', ' ' ), 703 $content 704 ); 683 705 684 706 return $content;
Note: See TracChangeset
for help on using the changeset viewer.