Javascript in href: worpress replaces single quotes
-
My plugin adds links with
href="javascript:var t=window.open('a', 'b', 'c');"
but what I end up with (in the output sent to the browser) is
href="javascript:var t=window.open('a" , 'b', 'c');"
That is, the first quote gets replaced by a double quote followed by a space. Of course, this breaks the javascript.
Is there a way around this? I am using add_filter(‘the_content’,..), maybe there is a filter that is used after WordPress has finished transforming links?
I found a post with the same problem, but no solution.
This hasn’t been always like that, at least not when I first wrote and tested the code. However, I don’t know which version broke it.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Javascript in href: worpress replaces single quotes’ is closed to new replies.