• Resolved nickk40

    (@nickk40)


    Inside a JS snippet I want the following:

    document.getElementsByClassName("some-class")[0].innerHTML = "<p>Some text <a href='/page/' target='_blank' rel='noopener'>Link</a>.</p>";

    The problem is that when I click Update, it automatically converts rel='noopener' to rel="noopener", which doesn’t work because it is already inside “…”. I’ve even tried to completely remove rel='noopener' but then when I hit the Update button it automatically puts it back.

    How can I make this work?

Viewing 1 replies (of 1 total)
  • Thread Starter nickk40

    (@nickk40)

    Oh, found the solution, just change it to:

    document.getElementsByClassName("some-class")[0].innerHTML = '<p>Some text <a href="/page/" target="_blank" rel="noopener">Link</a>.</p>';

    • This reply was modified 2 years, 6 months ago by nickk40.
Viewing 1 replies (of 1 total)
  • The topic ‘Automatically converts `rel=’noopener’` to `rel=”noopener”`’ is closed to new replies.