dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f7ce66
)
(bug 34666) Escape URLs in XML files created by generateSitemap.php
author
Liangent
<liangent@gmail.com>
Sun, 12 May 2013 15:36:59 +0000
(15:36 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Sun, 12 May 2013 17:10:39 +0000
(17:10 +0000)
Bug: 34666
Change-Id: Ifb6ddb0bc6ca03c411f938837b2f89a5a30e4fc3
maintenance/generateSitemap.php
patch
|
blob
|
history
diff --git
a/maintenance/generateSitemap.php
b/maintenance/generateSitemap.php
index
75907ad
..
86fb97a
100644
(file)
--- a/
maintenance/generateSitemap.php
+++ b/
maintenance/generateSitemap.php
@@
-490,7
+490,8
@@
class GenerateSitemap extends Maintenance {
function fileEntry( $url, $date, $priority ) {
return
"\t<url>\n" .
- "\t\t<loc>$url</loc>\n" .
+ // bug 34666: $url may contain bad characters such as ampersands.
+ "\t\t<loc>" . htmlspecialchars( $url ) . "</loc>\n" .
"\t\t<lastmod>$date</lastmod>\n" .
"\t\t<priority>$priority</priority>\n" .
"\t</url>\n";