Trim whitespace from generated text.
More robust argument handling in JavaScript; Trim generated text.
Add JavaScript unit tests (QUnit).
Merge conflict?