Mental debugging: your code is not in plain JavaScript or HTML file, but is printed from a scripting language in which # is a comment symbol. Part #/g, ''); treated as a comment in your script.
You need to add some quotation marks to ensure that the entire line is printed.
Richiehindle
source share