Launchpad tagging greasemonkey script fix

Brian Murray found a bug in my GreaseMonkey script for tagging Launchpad bugs. The issue was that if a Launchpad bug description had certain characters like &, +, >, <, then the description would be modified: +'s turned into spaces, &'s truncating the post... bad stuff.

Anyway, to fix just required unescaping the HTML retrieved *from* launchpad, to convert & to &, &gt; to >, and so on, and also required using encodeURIComponent() instead of just encodeURI().

I've been finding this script *quite* handy for going through bunches of Launchpad bugs and assigning various tags to them. However, I also found that a handful of descriptions got buggered up due to &'s, and so this bug fix will make it a LOT easier to trust the script to do the right thing all the time.

Posted in Submitted by bryce on Sat, 2008-01-12 10:31.
bryce's blog

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
More information about formatting options