Ignore:
Timestamp:
2013-05-17T17:43:28+12:00 (11 years ago)
Author:
ak19
Message:
  1. Handling quotes and colons in user comments: since these are sent and retrieved from metadata-server.pl as JSON strings, the quotes and colons in user-added meta needs to be protected since JSON uses these characters for packaging up data. 2. Cosmetic changes to baseaction: clarified some comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/macros/style.dm

    r27318 r27366  
    363363    divtime.appendChild(txt);
    364364
     365    // any quotes and colons in the fields would have been protected for transmitting as JSON
     366    // so decode their entity values
     367    comment = comment.replace(/"/gmi, '"');
     368    comment = comment.replace(/&58;/gmi, ':');
     369
    365370    divgroup.appendChild(divcomment);
    366371    txt=document.createTextNode(comment);
Note: See TracChangeset for help on using the changeset viewer.