Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-12-20 14:31:14 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-12-20 14:31:14 -0500
commitc3c7cfeefff430f9ac6994696f84ca549ddc4fca (patch)
tree3a918b2772d1bb7b0488a3622bc0f0c1ca35d96b /src
parentfa378a654ac850bf69705f4120ea3deb4d397e52 (diff)
downloadtame-c3c7cfeefff430f9ac6994696f84ca549ddc4fca.tar.gz
tame-c3c7cfeefff430f9ac6994696f84ca549ddc4fca.tar.bz2
tame-c3c7cfeefff430f9ac6994696f84ca549ddc4fca.zip
map.xsl: Escape all output in strings
Diffstat (limited to 'src')
-rw-r--r--src/current/compiler/map.xsl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/current/compiler/map.xsl b/src/current/compiler/map.xsl
index 05911f7..a1d6a83 100644
--- a/src/current/compiler/map.xsl
+++ b/src/current/compiler/map.xsl
@@ -359,7 +359,7 @@
<preproc:fragment id=":{$type}:{@to}">
<text>output['</text>
- <value-of select="@to" />
+ <value-of select="lvmc:escape-string( @to )" />
<text>']=</text>
<call-template name="lvmc:gen-input-default">
<with-param name="sym"
@@ -515,7 +515,7 @@
<otherwise>
<text>input['</text>
- <value-of select="$from" />
+ <value-of select="lvmc:escape-string( $from )" />
<text>']</text>
</otherwise>
</choose>
@@ -547,7 +547,7 @@
<preproc:fragment id=":{$type}:{@to}">
<text>output['</text>
- <value-of select="@to" />
+ <value-of select="lvmc:escape-string( @to )" />
<text>']='</text>
<value-of select="normalize-space( @value )" />
<text>';</text>
@@ -627,7 +627,7 @@
<template match="lvm:const" mode="lvmc:compile" priority="5">
<text>'</text>
- <value-of select="@value" />
+ <value-of select="lvmc:escape-string( @value )" />
<text>'</text>
</template>
@@ -635,7 +635,7 @@
<text>(function(){</text>
<text>var ret=[];</text>
<text>var len=input['</text>
- <value-of select="@each" />
+ <value-of select="lvmc:escape-string( @each )" />
<text>'].length;</text>
<text>for(var _i=0;_i&lt;len;_i++){</text>
@@ -915,7 +915,7 @@
<param name="type" as="xs:string" />
<text>case '</text>
- <value-of select="@key" />
+ <value-of select="lvmc:escape-string( @key )" />
<text>':</text>
<apply-templates select="." mode="lvmc:compile-translate">
<with-param name="type" select="$type" />
@@ -990,7 +990,7 @@
<template match="lvm:translate"
mode="lvmc:compile-translate" priority="1">
<text>ret.push('</text>
- <value-of select="normalize-space( @value )" />
+ <value-of select="lvmc:escape-string( normalize-space( @value ) )" />
<text>');</text>
</template>