Show
Ignore:
Timestamp:
10.01.2012 11:21:41 (8 years ago)
Author:
sjm84
Message:

CGI parameters will now have any newlines escaped

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/javascript-global-setup.xsl

    r24520 r24929  
    2222        <xsl:call-template name="populate-image-url-values"/> 
    2323        <xsl:call-template name="populate-metadata-values"/> 
     24        <xsl:call-template name="include-global-javascript-functions"/> 
    2425    </xsl:template> 
    2526     
     
    3031            <xsl:for-each select="/page/pageRequest/paramList/param"> 
    3132                <xsl:text disable-output-escaping="yes">name = "</xsl:text><xsl:value-of select="@name"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
    32                 <xsl:text disable-output-escaping="yes">value = "</xsl:text><xsl:value-of select="@value"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
     33                <xsl:text disable-output-escaping="yes">value = "</xsl:text><xsl:value-of select="util:escapeNewLines(@value)"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
    3334                <xsl:text disable-output-escaping="yes">name = name.replace(".", "_");</xsl:text> 
    3435                gs.cgiParams[name] = value; 
     
    104105            <xsl:text disable-output-escaping="yes">gs.imageURLs.pageIcon = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_icon_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
    105106            <xsl:text disable-output-escaping="yes">gs.imageURLs.trashFull = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'trash_full_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
     107            <xsl:text disable-output-escaping="yes">gs.imageURLs.blank = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'blank_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text> 
    106108        </script> 
     109    </xsl:template> 
     110     
     111    <xsl:template name="include-global-javascript-functions"> 
     112        <script type="text/javascript" src="interfaces/oran/js/javascript-global-functions.js"><xsl:text> </xsl:text></script> 
    107113    </xsl:template> 
    108114</xsl:stylesheet>