Skip to content

Commit f0e2608

Browse files
Document [values] option with warning (#1108)
Co-authored-by: sethg <sethg@geographika.co.uk>
1 parent 0484efb commit f0e2608

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎en/mapfile/template.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ call. *[mapext]* is substituted by a space delimited set of lower left
8888
and upper right coordinates. This would break the URL. *[mapext_esc]*
8989
is substituted by a proper encoded set.
9090

91+
.. warning::
92+
93+
If the datasource is untrusted, use the escaped versions of template
94+
substitutions to avoid cross-site scripting (XSS) vulnerabilities.
95+
96+
For example, if a field contains ``<script>alert(1)</script>`` and the
97+
unescaped value is included in the generated HTML, the script could be
98+
executed in the user's browser.
99+
91100
Format
92101
======
93102

@@ -772,6 +781,10 @@ processed as a result of a query.
772781

773782
[item name="area" precision="2" commify="2" format="Area is $value"]
774783

784+
[values]
785+
All attribute values of the feature in a single comma-delimited string.
786+
The values are unescaped. Available only when processing query results.
787+
775788
[attribute name],[attrribute name_esc],[attribute item name_raw]
776789
Attribute name from the data table of a queried layer. Only
777790
attributes for the active query layers are accessible. Case must

0 commit comments

Comments
 (0)