[yelp/webkit] Only add a script tag if a javascript file will be used
- From: Gustavo Noronha Silva <gns src gnome org>
- To: svn-commits-list gnome org
- Subject: [yelp/webkit] Only add a script tag if a javascript file will be used
- Date: Sun, 19 Jul 2009 12:31:10 +0000 (UTC)
commit 0cf4cdb917f0823f645a90b5bb6f5272de1f7f55
Author: Gustavo Noronha Silva <gns gnome org>
Date: Sun Jul 19 12:30:27 2009 +0100
Only add a script tag if a javascript file will be used
When converting docbook files to HTML, when there was no javascript to
be used, an invalid src was being generated, which caused WebKit
security checks to fail.
stylesheets/db2html.xsl.in | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/stylesheets/db2html.xsl.in b/stylesheets/db2html.xsl.in
index 4dff3c7..02e597c 100644
--- a/stylesheets/db2html.xsl.in
+++ b/stylesheets/db2html.xsl.in
@@ -88,11 +88,13 @@ FIXME: yelp:cache no longer works
<!-- == db2html.division.head.extra == -->
<xsl:template name="db2html.division.head.extra">
- <script type="text/javascript">
- <xsl:attribute name="src">
- <xsl:value-of select="concat('file://', $yelp.javascript)"/>
- </xsl:attribute>
- </script>
+ <xsl:if test="string($yelp.javascript) != ''">
+ <script type="text/javascript">
+ <xsl:attribute name="src">
+ <xsl:value-of select="concat('file://', $yelp.javascript)"/>
+ </xsl:attribute>
+ </script>
+ </xsl:if>
</xsl:template>
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]