Merge pull request #259 from krues8dr/master

Fixed #119, #237 and #243 (though I intend to undo the #243 commit as soon as this is merged).
Don't strip out parentheses from anchors

Undo commit 82743ce (#243).
Minor formatting changes
Adding escaping to javascript selectors that may have parentheses in them.  Resolves #243