Twitter uses wrong encoding when remove urls is ticked
Bug #1412510 reported by
Dan Garner
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Xibo |
Fix Released
|
Undecided
|
Dan Garner |
Bug Description
Something goes wrong with Twitter in the parsing of special characters like apostrophes, ' turns into â as seen in this example:
"Good students of @KaiminNews & @UMJSchool, enjoy winter break. I’m going to make your brain hurt starting next week. http://
turns into:
"Good students of @KaiminNews & @UMJSchool, enjoy winter break. Iâm going to make your brain hurt starting next week."
I'm not sure if this an issue in the character encoding used or what might be causing this, but it definitely looks bad.
Changed in xibo: | |
milestone: | none → 1.7.0 |
assignee: | nobody → Dan Garner (dangarner) |
Changed in xibo: | |
status: | New → Fix Released |
To post a comment you must log in.
can you try replacing the following line in modules/ twitter. module. php ?
Line 829: "@(https? ://([-\ w\.]+[- \w])+(: \d+)?(/ ([\w/_\ .#-]*(\ ?\S+)?[ ^\.\s]) ?)?)@", '', $tweet->text);
$tweetText = preg_replace(
becomes
$tweetText = preg_replace( "@(https? ://([-\ w\.]+[- \w])+(: \d+)?(/ ([\w/_\ .#-]*(\ ?\S+)?[ ^\.\s]) ?)?)@u" , '', $tweet->text);