Fix unescaped ampersands in bookmark links

Fixes issue #322 where the ampersands in bookmark links were not being
escaped. This required a new filter which actually had some use in other
places that I found so I applied it to those to reduce code duplication.
Merge pull request #361 from awiddersheim/fix_escaping_ampersand_bookmarks

Fix unescaped ampersands in bookmark links