Closed (fixed)
Project:
Typogrify
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
28 May 2013 at 07:55 UTC
Updated:
6 Nov 2013 at 06:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
subashroy2020 commentedVery useful information
Thanks
Comment #2
migmedia commentedComment #3
codycraven commentedConfirming, this is a massive bug and a security issue.
Comment #4
Anonymous (not verified) commentedI have had a look at the code, the attached patch to smartypants.php and unicode-conversion.php will allow the Typrogrify to work with "Display any HTML as plain text" filter in the order described in the issue.
The str_replace() call in ProcessEscapes() in smartypants.php converts angle brackets HTML entities ('<', '>') back to unescaped original characters ('<', '>'):
The plain text filter works after removing the angle bracket replacements in ProcessEscapes(). I've replaced them with '"', ''' and '"', "'" as Typrogrify look for them and turn them into typographer quotation marks.
Since plain filter now works, I've added angle bracket HTML entities to unicode-conversion.php, as now Typrogrify will have to work with HTML entities.
I am not sure if this will be the solution for everyone, but it worked in my client's sites for their use so far, so hopefully this is a step in the right direction.
Comment #5
migmedia commentedThis issue should be fixed in 7.x-1.x-dev.
As a side-effect, all arrow-replacements in the filter-settings will be unset. Because I haven't found a solution to change/update the filtersettings through the update-script.
!!! So please check your filtersettings after update!
@sunnz Thank you for your effort, your patch is very similar to my solution I had developed in the last days...
Comment #6
Anonymous (not verified) commented@migmedia, tested 7.x-1.x-dev and deployed on my client sites, works great!
Comment #7
migmedia commentedFixed in 7.x-1.0-rc8