Changeset 27018

Show
Ignore:
Timestamp:
07.03.2013 14:13:30 (7 years ago)
Author:
ak19
Message:

1. style.dm had a typo when referring back to the new macro, 2. depositdspace.dm javascript function now url-decodes all the chars encoded in cgiutil.cpp when getting them out of hte db. Thanks to Kathy.

Location:
main/trunk/greenstone2/macros
Files:
2 modified

Legend:

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

    r27014 r27018  
    275275 
    276276 
    277   function comma\_decode(str) 
     277  function comma\_and\_special_chars\_decode(str) 
    278278  \{ 
    279       var newstr = str.replace(/\\%27/g,"'"); 
     279      var newstr = newstr = str.replace(/\\%2F/g,"/"); 
     280      newstr = newstr.replace(/\\%27/g,"'"); 
     281      newstr = newstr.replace(/\\%22/g,"\\\""); 
     282      newstr = newstr.replace(/\\%26/g,"&"); 
     283      newstr = newstr.replace(/\\%3E/g,">"); 
     284      newstr = newstr.replace(/\\%3C/g,"<"); 
    280285 
    281286      // the comma was already being decoded for dspace's deposit dm file 
     
    293298      if (prevarray.value) \{ 
    294299 
    295         var prevvalarray = comma\_decode(prevarray.value); 
     300        var prevvalarray = comma\_and\_special_chars\_decode(prevarray.value); 
    296301 
    297302        var fieldnum = get\_fieldid(fieldid,"num"); 
     
    13631368  var authornum = "_di1authornum_"; 
    13641369  var authorsplit = "_di1authorsplit_"; 
    1365   var authorarray = comma\_decode("_di1authorarray_"); 
     1370  var authorarray = comma\_and\_special_chars\_decode("_di1authorarray_"); 
    13661371 
    13671372  present\_general(authorarray,authornum,authorsplit,combine\_author); 
     
    13841389  var seriesrepnum = "_di1seriesrepnum_"; 
    13851390  var seriesrepsplit = "_di1seriesrepsplit_"; 
    1386   var seriesreparray = comma\_decode("_di1seriesreparray_"); 
     1391  var seriesreparray = comma\_and\_special_chars\_decode("_di1seriesreparray_"); 
    13871392 
    13881393  present\_general(seriesreparray,seriesrepnum,seriesrepsplit,combine\_seriesrep); 
     
    13981403  var idnum = "_di1identifiernum_"; 
    13991404  var idsplit = "_di1identifiersplit_"; 
    1400   var idarray = comma\_decode("_di1identifierarray_"); 
     1405  var idarray = comma\_and\_special_chars\_decode("_di1identifierarray_"); 
    14011406 
    14021407  present\_general(idarray,idnum,idsplit,combine\_id); 
     
    14451450  var subnum = "_di1subjectnum_"; 
    14461451  var subsplit = "_di1subjectsplit_"; 
    1447   var subarray = comma\_decode("_di1subjectarray_"); 
     1452  var subarray = comma\_and\_special_chars\_decode("_di1subjectarray_"); 
    14481453 
    14491454  present\_general(subarray,subnum,subsplit,combine\_flat); 
     
    15591564  var authornum = "_di1authornum_"; 
    15601565  var authorsplit = "_di1authorsplit_"; 
    1561   var authorarray = comma\_decode("_di1authorarray_"); 
     1566  var authorarray = comma\_and\_special_chars\_decode("_di1authorarray_"); 
    15621567  var combauthor = combine\_escauthor(authorarray,authornum,authorsplit); 
    15631568  hidden\_multifield("ds.Author",combauthor); 
     
    15651570  var seriesrepnum = "_di1seriesrepnum_"; 
    15661571  var seriesrepsplit = "_di1seriesrepsplit_"; 
    1567   var seriesreparray = comma\_decode("_di1seriesreparray_"); 
     1572  var seriesreparray = comma\_and\_special_chars\_decode("_di1seriesreparray_"); 
    15681573  var combseriesrep = combine\_seriesrep(seriesreparray,seriesrepnum,seriesrepsplit); 
    15691574  hidden\_multifield("ds.Series",combseriesrep); 
     
    15711576  var idnum = "_di1identifiernum_"; 
    15721577  var idsplit = "_di1identifiersplit_"; 
    1573   var idarray = comma\_decode("_di1identifierarray_"); 
     1578  var idarray = comma\_and\_special_chars\_decode("_di1identifierarray_"); 
    15741579  var combid = combine\_id(idarray,idnum,idsplit); 
    15751580  hidden\_multifield("ds.Identifier",combid); 
     
    15781583  var subnum = "_di1subjectnum_"; 
    15791584  var subsplit = "_di1subjectsplit_"; 
    1580   var subarray = comma\_decode("_di1subjectarray_"); 
     1585  var subarray = comma\_and\_special_chars\_decode("_di1subjectarray_"); 
    15811586  var combsub = combine\_flat(subarray,subnum,subsplit); 
    15821587  hidden\_multifield("ds.Subject",combsub); 
  • main/trunk/greenstone2/macros/style.dm

    r27014 r27018  
    7373  <link rel="stylesheet" href="_httpstyle_/style-print.css" type="text/css"  
    7474   title="Printer" charset="UTF-8" media="print" _linktagend_  
    75   _cssfilelinkextra_ 
     75  _cssfilelinkextra_  
    7676} 
    7777 
     
    9696 
    9797# separate macro so additional stylesheets (to those included by default) can be specified 
    98 _cssfilelinkeextra_ {} 
     98_cssfilelinkextra_ {} 
    9999 
    100100# Languages that should be displayed right-to-left