Closed bboughton closed 12 years ago
Rails url helpers escape special characters when creating urls, so when jQCloud escapes the url it double escapes it.
<script type="text/javascript" > var word_array = [{text: "John's Bday", weight: 1, link: "/posts?tag=John%27s+Bday"}] </script>
Becomes...
<span id="example_word_1" class="w1"> <a href="/posts?tag=John%2527s+Bday">John's Bday</a> </span>
Which doesn't link correctly.
Adding a boolean option _encodeurls that would allow the user to decide
Just for other fellow developers that had the same problem: the library already has an encodeURI option that can be set to false/true and it is true by default.
Rails url helpers escape special characters when creating urls, so when jQCloud escapes the url it double escapes it.
Becomes...
Which doesn't link correctly.
Suggested fix
Adding a boolean option _encodeurls that would allow the user to decide