Changeset 26562 for main


Ignore:
Timestamp:
12/06/12 16:12:19 (8 years ago)
Author:
sjm84
Message:

Make sure angle brackets in attributes are properly escaped

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js

    r26554 r26562  
    143143            if(editor.length)
    144144            {
    145                 var xmlString = editor.val();
     145                var xmlString = editor.val().replace(/&/g, "&");
    146146                try
    147147                {
     
    156156                var url = gs.xsltParams.library_name;
    157157                var parameters = {"a":"g", "rt":"r", "s":"SaveXMLTemplateToFile", "s1.filePath":_currentFilepath, "s1.namespace":_currentNamespace, "s1.nodename":_currentNodename, "s1.xml":xmlString};
    158                
     158
    159159                if(_currentName && _currentName.length > 0){parameters["s1.name"] = _currentName;}
    160160                if(_currentMatch && _currentMatch.length > 0){parameters["s1.match"] = _currentMatch;}
    161                
     161
    162162                _saveButton.val("Saving...");
    163163                _saveButton.attr("disabled", "disabled");
    164                
     164
    165165                $.post(url, parameters)
    166166                .success(function()
Note: See TracChangeset for help on using the changeset viewer.