]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commit
smiley escaping fixes
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:27:33 +0000 (12:27 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:27:33 +0000 (12:27 -0400)
commitb734e80a703c79e464b1bce6391e8e8f682c6a73
tree9a9201d01dfd70273d247339a6f460bb041d0088
parent8f44a98825f1dc61d9aa738220f2156c2fa7e2b2
smiley escaping fixes

Smileys need to be double-escaped to work, since the smiley plugin runs as
a sanitize hook, and markdown helpfully removes one level of escapes first.

There were some bugs in the smiley handling code that made escaped smileys
still be expanded. After unescaping a smiley, it needed to move pos forward
past it or the next pass would expand it.

Also, once the m//g got to the end, it seemed to loop back through and make
one more pass (a difference in perl 5.10's regexp exngine? I observed that
pos was undefined when this happened, so added a `last unless defined pos`.
(cherry picked from commit df3a8b183c4e6b50b05ba3c4514563619927c924)
IkiWiki/Plugin/smiley.pm
debian/changelog
doc/smileys.mdwn