fixes #1800 escape javascript strings (page broken in Catala)

This commit is contained in:
plegall
2022-11-22 11:04:57 +01:00
parent 5d7f594224
commit ea89357618
2 changed files with 16 additions and 16 deletions

View File

@@ -45,18 +45,18 @@ jQuery("a.preview-box").colorbox({
photo: true photo: true
}); });
str_are_you_sure = '{'Are you sure?'|translate}'; str_are_you_sure = '{'Are you sure?'|translate|escape:javascript}';
str_yes = '{'Yes, delete'|translate}'; str_yes = '{'Yes, delete'|translate|escape:javascript}';
str_no = '{'No, I have changed my mind'|translate|@escape:'javascript'}'; str_no = '{'No, I have changed my mind'|translate|@escape:'javascript'}';
url_delete = '{$U_DELETE}'; url_delete = '{$U_DELETE}';
str_albums_found = '{"<b>%d</b> albums found"|translate}'; str_albums_found = '{"<b>%d</b> albums found"|translate|escape:javascript}';
str_album_found = '{"<b>1</b> album found"|translate}'; str_album_found = '{"<b>1</b> album found"|translate|escape:javascript}';
str_result_limit = '{"<b>%d+</b> albums found, try to refine the search"|translate|escape:javascript}'; str_result_limit = '{"<b>%d+</b> albums found, try to refine the search"|translate|escape:javascript}';
str_orphan = '{'This photo is an orphan'|@translate}'; str_orphan = '{'This photo is an orphan'|@translate|escape:javascript}';
str_no_search_in_progress = '{'No search in progress'|@translate}'; str_no_search_in_progress = '{'No search in progress'|@translate|escape:javascript}';
related_categories_ids = {$related_categories_ids|@json_encode}; related_categories_ids = {$related_categories_ids|@json_encode};
str_already_in_related_cats = '{'This albums is already in related categories list'|translate}'; str_already_in_related_cats = '{'This albums is already in related categories list'|translate|escape:javascript}';
{literal} {literal}
$('#action-delete-picture').on('click', function() { $('#action-delete-picture').on('click', function() {

View File

@@ -22,18 +22,18 @@ const title_msg = '{'Are you sure you want to delete the user "%s"?'|@translate|
const are_you_sure_msg = '{'Are you sure?'|@translate|@escape:'javascript'}'; const are_you_sure_msg = '{'Are you sure?'|@translate|@escape:'javascript'}';
const confirm_msg = '{'Yes, I am sure'|@translate|@escape}'; const confirm_msg = '{'Yes, I am sure'|@translate|@escape}';
const cancel_msg = '{'No, I have changed my mind'|@translate|@escape}'; const cancel_msg = '{'No, I have changed my mind'|@translate|@escape}';
const str_and_others_tags = '{'and %s others'|@translate}'; const str_and_others_tags = '{'and %s others'|@translate|escape:javascript}';
const missingConfirm = "{'You need to confirm deletion'|translate|escape:javascript}"; const missingConfirm = "{'You need to confirm deletion'|translate|escape:javascript}";
const missingUsername = "{'Please, enter a login'|translate|escape:javascript}"; const missingUsername = "{'Please, enter a login'|translate|escape:javascript}";
const fieldNotEmpty = "{'Name field must not be empty'|@translate|escape:javascript}" const fieldNotEmpty = "{'Name field must not be empty'|@translate|escape:javascript}"
const registered_str = '{"Registered"|@translate}'; const registered_str = '{"Registered"|@translate|escape:javascript}';
const last_visit_str = '{"Last visit"|@translate}'; const last_visit_str = '{"Last visit"|@translate|escape:javascript}';
const dates_infos = '{'between %s and %s'|translate}' const dates_infos = '{'between %s and %s'|translate|escape:javascript}'
const hide_str = '{'Hide'|@translate}'; const hide_str = '{'Hide'|@translate|escape:javascript}';
const show_str = '{'Show'|@translate}'; const show_str = '{'Show'|@translate|escape:javascript}';
const user_added_str = '{'User %s added'|@translate}'; const user_added_str = '{'User %s added'|@translate|escape:javascript}';
const str_popin_update_btn = '{'Update'|@translate}'; const str_popin_update_btn = '{'Update'|@translate|escape:javascript}';
const history_base_url = "{$U_HISTORY}"; const history_base_url = "{$U_HISTORY}";
const view_selector = '{$view_selector}'; const view_selector = '{$view_selector}';