I'm making a list of links that have bookmarklets inside. The problem is that there are quotes in the bookmarklet that clash with the quotes. Is there a way to fix this, or otherwise is there a different way to do it?
Code:
<a href='javascript:(function() { var l = document.querySelector("link[rel*='icon']") || document.createElement('link'); l.type = 'image/x-icon'; l.rel = 'shortcut icon'; l.href = 'https://google.com/favicon.ico'; document.getElementsByTagName('head')[0].appendChild(l); document.title = 'Google';})();'>Code</a>
I tried changing the quote type, but that doesn't work. I want the javascript to be inside the link.