Gotta escape & before other stuff in markdownify - in 1.8 it was always first but not in 1.9 because the list of entities was a hash. This change converts to an array.

This commit is contained in:
Sarah Mei 2011-09-03 11:26:11 -07:00
parent 2afb646286
commit 9960b5b189

View file

@ -116,13 +116,13 @@ module Diaspora
end
def preprocess(full_document)
entities = {
'>' => '>',
'<' => '&lt;',
'&' => '&amp;',
}
entities.each do |k,v|
full_document = full_document.gsub(k, v)
entities = [
['&', '&amp;'],
['>', '&gt;'],
['<', '&lt;']
]
entities.each do |original, replacement|
full_document = full_document.gsub(original, replacement)
end
if @specialchars