Commit 87676291 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

html2text: process ampersands after stripping unknown entities (bug 3258)

parent b2705eb2
......@@ -170,7 +170,6 @@ class html2text
'/&(apos|rsquo|lsquo|#8216|#8217);/i', // Single quotes
'/>/i', // Greater-than
'/</i', // Less-than
'/&(amp|#38);/i', // Ampersand
'/&(copy|#169);/i', // Copyright
'/&(trade|#8482|#153);/i', // Trademark
'/&(reg|#174);/i', // Registered
......@@ -179,7 +178,8 @@ class html2text
'/&(bull|#149|#8226);/i', // Bullet
'/&(pound|#163);/i', // Pound sign
'/&(euro|#8364);/i', // Euro sign
'/&[^&;]+;/i', // Unknown/unhandled entities
'/&(?!(amp|#38))[^&;]+;/i', // Unknown/unhandled entities
'/&(amp|#38);/i', // Ampersand
'/[ ]{2,}/' // Runs of spaces, post-handling
);
......@@ -217,7 +217,6 @@ class html2text
"'", // Single quotes
'>',
'<',
'&',
'(c)',
'(tm)',
'(R)',
......@@ -227,6 +226,7 @@ class html2text
'£',
'EUR', // Euro sign. € ?
'', // Unknown/unhandled entities
'&',
' ' // Runs of spaces, post-handling
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment