Branch: Tag:

2005-09-02

2005-09-02 07:46:27 by Tobias Liin <liin@roxen.com>

Added removal of potential bytes before the first '<' in an XML file, if the argument decode-xml is provided the tag

Rev: server/modules/tags/insert_cached_href.pike:1.7

518:       string res = href_database->get_data(Attributes(args)->get_db_args(),    (["x-roxen-recursion-depth":recursion_depth])); -  if(args["decode-xml"]) +  +  if(args["decode-xml"]) {    // Parse xml header and recode content to internal representation.    res = Parser.XML.Simple()->autoconvert(res);    -  +  // Remove any bytes potentially still preceeding the first '<' in the xml file +  return res[search(res, "<")..]; +  } +     return res;    }   }