beezwax / WP-Publish-to-Apple-News

Other
17 stars 81 forks source link

Fixing bad stripping of spaces #8

Closed hughiemolloy closed 4 years ago

hughiemolloy commented 4 years ago

The current stripping of chr(194) breaks multibyte characters. The entire component then fails sanitation. This bug can be seen in the example code below.

$string = '2½-feet';

$string = str_replace( chr(194), ' ', $string );

echo $string;