Show
Ignore:
Timestamp:
12.06.2017 14:48:20 (2 years ago)
Author:
kjdon
Message:

dm_safing the decodedcompressedargs - which I think is always used inside a form - breaks the depositor if there is an underscore in hte filename. Does it make sense for there ever to be a macro in this anyway? would we ever be in a position to scan this for macros? I think not. So ai have make decodedcompressedoptions to be not dm_safed. However, just in case we did actually need it, I have made _decodedcompressedOptionsAttrDmSafe_ which *is* dm_safed, so this can be used by changing the macro file, not requiring code changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/receptionist.cpp

    r30374 r31731  
    11051105 
    11061106  text_t compressed_args; 
     1107    
    11071108  if (compress_save_args (argsinfo, configinfo.saveconf, args,  
    11081109              compressed_args, *outconverter, logout)) 
    1109     return compressed_args; 
     1110     return compressed_args; 
    11101111 
    11111112  return g_EmptyText; 
     
    14831484  // (e.g. %25 becomes %2525) 
    14841485  decode_cgi_arg (compressedoptions);  
     1486 
    14851487  if (args["w"] == "utf-8") { // if the encoding was utf-8, then compressed options was utf-8, and we need unicode. 
    14861488    // if encoding wasn't utf-8, then compressed opotions may be screwed up, but seems to work for 8 bit encodings? 
     
    14881490  } 
    14891491 
    1490   text_t dmacrovalue = dm_safe(compressedoptions); 
     1492  // does it need to be dm_safed? this breaks depositor when there is _ in filename 
     1493  //text_t dmacrovalue = dm_safe(compressedoptions); 
     1494  text_t dmacrovalue = compressedoptions; 
     1495 
    14911496  disp.setmacro ("decodedcompressedoptions", displayclass::defaultpackage, dmacrovalue);  
    14921497  disp.setmacro ("decodedcompressedoptionsAttrsafe", displayclass::defaultpackage, encodeForHTMLAttr(dmacrovalue)); 
     1498  // the old version was dm_safed, so make a dm safe version in case we need it 
     1499  disp.setmacro ("decodedcompressedoptionsAttrDmsafe", displayclass::defaultpackage, encodeForHTMLAttr(dm_safe(dmacrovalue))); 
    14931500 
    14941501#if defined (__WIN32__)