H
HopfZ
When publishing bookmarklets, we put the bookmarklet code in anchor tag
like this:
<a href="javascript: alert('test');"> name </a>
Some characters of the code need to be escaped. For example, double
quotes need to be escaped as %22 like in this example:
<a href="javascript: var doubleQuote = '%22'; alert(doubleQuote);">
name </a>
Question: Is double quotes the only thing that need to be escaped?
I have seen examples of escaping spaces as %20, but it seems
unnecessary in most browsers i have used.
Thanks in advance.
like this:
<a href="javascript: alert('test');"> name </a>
Some characters of the code need to be escaped. For example, double
quotes need to be escaped as %22 like in this example:
<a href="javascript: var doubleQuote = '%22'; alert(doubleQuote);">
name </a>
Question: Is double quotes the only thing that need to be escaped?
I have seen examples of escaping spaces as %20, but it seems
unnecessary in most browsers i have used.
Thanks in advance.