Changeset 30309

Show
Ignore:
Timestamp:
31.10.2015 12:03:04 (4 years ago)
Author:
litvinovg
Message:

Fix ckeditor config to prevent creating &quot symbols from double quotes and replace for % symbol which led to failed rebuild.

Location:
main/trunk/greenstone3/web/interfaces/default/js
Files:
2 modified

Legend:

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

    r29861 r30309  
    55 
    66CKEDITOR.editorConfig = function( config ) { 
     7    //Preventing convert entities 
     8    config.entities = false; 
    79    // Define changes to default configuration here. For example: 
    810    // config.language = 'fr'; 
  • main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts_util.js

    r30168 r30309  
    336336        { 
    337337            var section = changedElem.parentDiv.parentItem; 
    338             saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + section.collection + '", "oid":"' + section.nodeID + '"}'); //' 
     338            saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/%/g, "%25").replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + section.collection + '", "oid":"' + section.nodeID + '"}'); //' 
    339339            addCollectionToBuild(section.collection); 
    340340        } 
     
    343343            var id = changedElem.getAttribute("id"); 
    344344            var sectionID = id.substring(4); 
    345             saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + gs.cgiParams.c + '", "oid":"' + sectionID + '"}'); //' 
     345            saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/%/g, "%25").replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + gs.cgiParams.c + '", "oid":"' + sectionID + '"}'); //' 
    346346            addCollectionToBuild(gs.cgiParams.c); 
    347347        }