escape the ' in the json (don't ask me why the four \ are needed, it was trial and error :P)
This commit is contained in:
parent
197b8fe73f
commit
d97939a18f
2 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@all_contacts_and_ids.to_json}' ),
|
||||
var data = $.parseJSON( '#{@all_contacts_and_ids.to_json.gsub("'", "\\\\'")}' ),
|
||||
autocompleteInput = $("#contact_autocomplete");
|
||||
|
||||
autocompleteInput.autoSuggest(data, {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@tags_array.to_json}' ),
|
||||
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
|
||||
autocompleteInput = $("#profile_tag_string");
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue