You only need to remove the cut to 256 characters in your browser.js. The truncature is now done by the content so you will received an already truncated string if it needs to be truncated.
We also need to port the changes in the tests. But thanks for the information.
ToDo: 1. Port UI and test changes from Bug 606817. 2. Port test changes from: 2.1 [Bug 600155] Let the authors override validation message with x-mozerrormessage attribute. 2.2 http://hg.mozilla.org/mozilla-central/rev/b343269c3aa4 Merging to tip. a=blocking-b7
Created attachment 488870 [details] [diff] [review] Patch v1.0 fix code plus test. Ports Bug 606817, plus roll-up fix for all the patches from Firefox for browser_bug561636.js
Note: passes all tests in browser_bug561636.js using: $ TEST_PATH=suite/browser/test/browser_bug561636.js make -C ../objdir-sm/ mochitest-browser-chrome
Pushed to comm-central http://hg.mozilla.org/comm-central/rev/7c770ed05601