Skip to content

Commit

Permalink
Merge pull request #851 from LukasReschke/sanitize-file-name
Browse files Browse the repository at this point in the history
Sanitize file name
  • Loading branch information
Friedrich committed Jan 5, 2015
2 parents 4b06c28 + 9d170f8 commit 60a1269
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ See also section about WebODF
### Fixes

* Only highlight ODF fields in edit mode ([#816](https://github.com/kogmbh/WebODF/issues/816))

* Prevent Cross-Site Scripting from file names ([#851](https://github.com/kogmbh/WebODF/pull/851)))

## Wodo.TextEditor
See also section about WebODF
Expand Down
4 changes: 3 additions & 1 deletion programs/viewer/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ function Viewer(viewerPlugin) {
url = location;
filename = url.replace(/^.*[\\\/]/, '');
document.title = filename;
document.getElementById('documentName').innerHTML = document.title;
var documentName = document.getElementById('documentName');
documentName.innerHTML = "";
documentName.appendChild(documentName.ownerDocument.createTextNode(document.title));

viewerPlugin.onLoad = function () {
document.getElementById('pluginVersion').innerHTML = viewerPlugin.getPluginVersion();
Expand Down
3 changes: 2 additions & 1 deletion webodf/lib/odf/OdfCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,8 @@
// FIXME: We need to support parametrized strings, because
// drop-in word replacements are inadequate for translations;
// see http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles
element.innerHTML = runtime.tr('Loading') + ' ' + url + '...';
element.innerHTML = "";
element.appendChild(element.ownerDocument.createTextNode(runtime.tr('Loading') + url + '...'));
element.removeAttribute('style');
// open the odf container
odfcontainer = new odf.OdfContainer(url, function (container) {
Expand Down

0 comments on commit 60a1269

Please sign in to comment.