<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Seems to me the problem is the use of the semicolon as the seperator<br>> somewhere in the ruby code, perhaps that should be changed? At the
<br>> very least it should be some character that's actually illegal in tag,<br>> like some control character. I often use Ctrl-A or the null character<br>> for this. Using the semicolon while not forbidding it in the API shows
<br>> insufficient use of quoting.<br><br>Well obviously, it's a bug! I was just explaining what has happened.<br><br>I notice that nobody has cared enough to provide a fix, or even to<br>enter a trac ticket for it.
</blockquote><div><br><br>"Everybody stand back, I know regular expressions..." [1]<br><br>In the split_tags method instead of tags.split... do:<br> tags.scan( /(.*?=[^=]*)(?:;|$)/ ) do |tag| ...<br><br>This will effectively split tags based on the combined presence of = and ; rather than just one or the other.
<br>It fixes the whole PGS blah thing.<br>It's still fairly trivial to come up with strings that break it, but they mostly rely on using equals.<br>; and = should really be escaped. But that requires a much bigger fix.
<br><br></div><br>Dave<br><br>[1] <a href="http://xkcd.com/208/">http://xkcd.com/208/</a><br><br><br></div>