Escape fixes + specs

Adds testing for affected components to @anowell's commit which escapes characters jquery does not like.