diff --git a/source/web/scripts/office/doc_details.js b/source/web/scripts/office/doc_details.js index 9358a84c06..5c3202ed8f 100644 --- a/source/web/scripts/office/doc_details.js +++ b/source/web/scripts/office/doc_details.js @@ -49,7 +49,7 @@ var OfficeDocDetails = { tag.addEvent('click', function(e) { - window.location.href = window.serviceContextPath + "/office/tags?p=" + window.queryObject.p + "&tag=" + tag.innerHTML; + window.location.href = window.serviceContextPath + "/office/tags?p=" + window.queryObject.p + "&tag=" + encodeURI(tag.innerHTML); }); }); }, @@ -70,13 +70,13 @@ var OfficeDocDetails = addTag: function(nodeId, tagName) { - OfficeAddin.postAction(window.serviceContextPath + "/collaboration/tagActions", "add", nodeId, null, "t=" + tagName); + OfficeAddin.postAction(window.serviceContextPath + "/collaboration/tagActions", "add", nodeId, null, "t=" + encodeURI(tagName)); return false; }, removeTag: function(nodeId, tagName) { - OfficeAddin.postAction(window.serviceContextPath + "/collaboration/tagActions", "remove", nodeId , null, "t=" + tagName); + OfficeAddin.postAction(window.serviceContextPath + "/collaboration/tagActions", "remove", nodeId , null, "t=" + encodeURI(tagName)); return false; } }; diff --git a/source/web/scripts/office/tags.js b/source/web/scripts/office/tags.js index 5cb0ae8706..c124f93964 100644 --- a/source/web/scripts/office/tags.js +++ b/source/web/scripts/office/tags.js @@ -80,7 +80,7 @@ var OfficeTags = var maxResults = 100; var args = OfficeTags.searchParams + "&type=tag"; - var actionURL = window.serviceContextPath + "/office/searchResults?p=" + args + "&search=" + tagName.replace(" ", "_x0020_") + "&maxresults=" + maxResults; + var actionURL = window.serviceContextPath + "/office/searchResults?p=" + args + "&search=" + encodeURI(tagName.replace(" ", "_x0020_")) + "&maxresults=" + maxResults; var myAjax = new Ajax(actionURL, { method: 'get', headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},