Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-514: Added explicit media-type with UTF* charset to *.xsl files that don't already have one

Chris M. Hostetter858b4116d70d
diff --git a/CHANGES.txt b/CHANGES.txt
index c537665b7d4..c7bb47ca8c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -407,6 +407,9 @@ Bug Fixes
30. SOLR-539: Fix for non-atomic long counters and a cast fix to avoid divide
by zero. (Sean Timm via Otis Gospodnetic)
+31. SOLR-514: Added explicit media-type with UTF* charset to *.xsl files that
+ don't already have one. (hossman)
+
Other Changes
1. SOLR-135: Moved common classes to org.apache.solr.common and altered the
build scripts to make two jars: apache-solr-1.3.jar and
diff --git a/example/solr/conf/xslt/example_atom.xsl b/example/solr/conf/xslt/example_atom.xsl
index e71797219e3..e1c7d5a2af2 100644
--- a/example/solr/conf/xslt/example_atom.xsl
+++ b/example/solr/conf/xslt/example_atom.xsl
@@ -24,7 +24,11 @@
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
- <xsl:output method="xml" encoding="utf-8" />
+ <xsl:output
+ method="xml"
+ encoding="utf-8"
+ media-type="text/xml; charset=UTF-8"
+ />
<xsl:template match='/'>
<xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
diff --git a/example/solr/conf/xslt/example_rss.xsl b/example/solr/conf/xslt/example_rss.xsl
index 57bb2799b5d..3e09e654d5f 100644
--- a/example/solr/conf/xslt/example_rss.xsl
+++ b/example/solr/conf/xslt/example_rss.xsl
@@ -24,7 +24,11 @@
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
- <xsl:output method="xml" encoding="utf-8" />
+ <xsl:output
+ method="xml"
+ encoding="utf-8"
+ media-type="text/xml; charset=UTF-8"
+ />
<xsl:template match='/'>
<rss version="2.0">
<channel>
diff --git a/example/solr/conf/xslt/luke.xsl b/example/solr/conf/xslt/luke.xsl
index 2ff77389566..cc21ee9b69f 100644
--- a/example/solr/conf/xslt/luke.xsl
+++ b/example/solr/conf/xslt/luke.xsl
@@ -22,8 +22,13 @@
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" version="1.0">
- <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8"/>
+ <xsl:output
+ method="xml"
+ encoding="UTF-8"
+ media-type="text/xml; charset=UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ />
<xsl:variable name="title">Solr Luke Request Handler Response</xsl:variable>
diff --git a/src/webapp/web/admin/analysis.xsl b/src/webapp/web/admin/analysis.xsl
index e2b48f27048..023e3f3353a 100644
--- a/src/webapp/web/admin/analysis.xsl
+++ b/src/webapp/web/admin/analysis.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
indent="yes"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/logging.xsl b/src/webapp/web/admin/logging.xsl
index 3678ea5b83e..aabb378507f 100644
--- a/src/webapp/web/admin/logging.xsl
+++ b/src/webapp/web/admin/logging.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
indent="yes"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/meta.xsl b/src/webapp/web/admin/meta.xsl
index a1c608537f8..6f6c114bb04 100644
--- a/src/webapp/web/admin/meta.xsl
+++ b/src/webapp/web/admin/meta.xsl
@@ -20,6 +20,8 @@
<xsl:output
method="html"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/ping.xsl b/src/webapp/web/admin/ping.xsl
index 364577bc69c..e8640d7cbb1 100644
--- a/src/webapp/web/admin/ping.xsl
+++ b/src/webapp/web/admin/ping.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
indent="yes"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/registry.xsl b/src/webapp/web/admin/registry.xsl
index 53ff775cc3b..5e829063821 100644
--- a/src/webapp/web/admin/registry.xsl
+++ b/src/webapp/web/admin/registry.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/stats.xsl b/src/webapp/web/admin/stats.xsl
index 80ccc913e41..803bdefb38b 100644
--- a/src/webapp/web/admin/stats.xsl
+++ b/src/webapp/web/admin/stats.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/tabular.xsl b/src/webapp/web/admin/tabular.xsl
index c043bfd9adf..ff1a9e34674 100644
--- a/src/webapp/web/admin/tabular.xsl
+++ b/src/webapp/web/admin/tabular.xsl
@@ -26,6 +26,8 @@
<xsl:output
method="html"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
diff --git a/src/webapp/web/admin/threaddump.xsl b/src/webapp/web/admin/threaddump.xsl
index 999b05d009b..7a22442168d 100644
--- a/src/webapp/web/admin/threaddump.xsl
+++ b/src/webapp/web/admin/threaddump.xsl
@@ -25,6 +25,8 @@
<xsl:output
method="html"
indent="yes"
+ encoding="utf-8"
+ media-type="text/html; charset=UTF-8"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />