hgtemplates: escape filenames in pushlog ATOM feed (Bug 1575686) r=glob
authorConnor Sheehan <sheehan@mozilla.com>
Thu, 22 Aug 2019 15:38:33 +0000
changeset 7151 bcbca3117cf7e1f5e714df004de1810e2295a6b8
parent 7150 9441e61744ff8e8ac6df518d0f16126797c515da
child 7152 099edd42753ebd51875fd0a29e9e52a34a35e4f7
push id3560
push usercosheehan@mozilla.com
push dateThu, 22 Aug 2019 15:38:51 +0000
treeherderversion-control-tools@bcbca3117cf7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglob
bugs1575686
hgtemplates: escape filenames in pushlog ATOM feed (Bug 1575686) r=glob A few of the Thunderbird devs noticed the ATOM pushlog feed was busted recently. Upon further inspection it appears we have not been escaping filenames in the ATOM feed since it's inception (~10 years ago!). This commit passes the filename through the `escape` template filter. We also add a new push/changeset to the test setup, with a filename that includes an `&` character, to confirm the results are escaped in `test-hgweb-atom.t`. This causes a few other tests to change as well, since the new push will be included in output of those tests. Differential Revision: https://phabricator.services.mozilla.com/D43082
hgext/pushlog/tests/helpers.sh
hgext/pushlog/tests/test-hgweb-atom.t
hgext/pushlog/tests/test-hgweb-feed.t
hgext/pushlog/tests/test-hgweb-user-queries.t
hgtemplates/atom/map
--- a/hgext/pushlog/tests/helpers.sh
+++ b/hgext/pushlog/tests/helpers.sh
@@ -298,11 +298,18 @@ maketestrepousers() {
   
   # Push 31
   echo "checkin 60" >> testfile
   hg commit -A -m "checkin 60" --user "johndoe@cuatro"
   echo "checkin 61" >> testfile
   hg commit -A -m "checkin 61" --user "johndoe@cuatro"
   hg push
   sqlite3 ../hg-test/.hg/pushlog2.db 'UPDATE pushlog SET date = 1229961000, user = "johndoe" WHERE id = 31'
-  
+
+  # Push 32
+  # Filename with escape character
+  echo "checkin 61" >> testfile\&hello
+  hg commit -A -m "checkin 61" --user "luser"
+  hg push
+  sqlite3 ../hg-test/.hg/pushlog2.db 'UPDATE pushlog SET date = 1229970000, user = "luser" WHERE id = 32'
+
   export ENDTIME="2008-12-23%2010:50:00"
 }
--- a/hgext/pushlog/tests/test-hgweb-atom.t
+++ b/hgext/pushlog/tests/test-hgweb-atom.t
@@ -11,16 +11,30 @@ Get only the latest 10 pushes via pushlo
   <?xml version="1.0" encoding="ascii"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
    <id>http://localhost:$HGPORT/hg-test/pushlog</id>
    <link rel="self" href="http://localhost:$HGPORT/hg-test/pushlog"/>
    <link rel="alternate" href="http://localhost:$HGPORT/hg-test/pushloghtml"/>
    <title>hg-test Pushlog</title>
    <updated>*</updated> (glob)
    <entry>
+    <title>Changeset 7d352806437fb407ffaa87bcb7d2d79488801c10</title>
+    <id>http://www.selenic.com/mercurial/#changeset-7d352806437fb407ffaa87bcb7d2d79488801c10</id>
+    <link href="http://localhost:$HGPORT/hg-test/rev/7d352806437fb407ffaa87bcb7d2d79488801c10"/>
+    <updated>*</updated> (glob)
+    <author>
+     <name>luser</name>
+    </author>
+    <content type="xhtml">
+     <div xmlns="http://www.w3.org/1999/xhtml">
+      <ul class="filelist"><li class="file">testfile&amp;hello</li></ul>
+     </div>
+    </content>
+   </entry>
+   <entry>
     <title>Changeset 054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</title>
     <id>http://www.selenic.com/mercurial/#changeset-054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</id>
     <link href="http://localhost:$HGPORT/hg-test/rev/054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"/>
     <updated>*</updated> (glob)
     <author>
      <name>johndoe</name>
     </author>
     <content type="xhtml">
@@ -262,16 +276,33 @@ Get only the latest 10 pushes via pushlo
      <name>luser</name>
     </author>
     <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
       <ul class="filelist"><li class="file">testfile</li></ul>
      </div>
     </content>
    </entry>
+  
+  </feed>
+
+
+Get the second page of 10 pushes via pushlog/2
+  $ http "http://localhost:$HGPORT/hg-test/pushlog/2" --header content-type --body-file body
+  200
+  content-type: application/atom+xml
+
+  $ cat body
+  <?xml version="1.0" encoding="ascii"?>
+  <feed xmlns="http://www.w3.org/2005/Atom">
+   <id>http://localhost:$HGPORT/hg-test/pushlog</id>
+   <link rel="self" href="http://localhost:$HGPORT/hg-test/pushlog"/>
+   <link rel="alternate" href="http://localhost:$HGPORT/hg-test/pushloghtml"/>
+   <title>hg-test Pushlog</title>
+   <updated>*</updated> (glob)
    <entry>
     <title>Changeset f4835d42999840c490559b5f933036ee8f2ed6af</title>
     <id>http://www.selenic.com/mercurial/#changeset-f4835d42999840c490559b5f933036ee8f2ed6af</id>
     <link href="http://localhost:$HGPORT/hg-test/rev/f4835d42999840c490559b5f933036ee8f2ed6af"/>
     <updated>*</updated> (glob)
     <author>
      <name>johndoe</name>
     </author>
@@ -290,33 +321,16 @@ Get only the latest 10 pushes via pushlo
      <name>johndoe</name>
     </author>
     <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
       <ul class="filelist"><li class="file">testfile</li></ul>
      </div>
     </content>
    </entry>
-  
-  </feed>
-
-
-Get the second page of 10 pushes via pushlog/2
-  $ http "http://localhost:$HGPORT/hg-test/pushlog/2" --header content-type --body-file body
-  200
-  content-type: application/atom+xml
-
-  $ cat body
-  <?xml version="1.0" encoding="ascii"?>
-  <feed xmlns="http://www.w3.org/2005/Atom">
-   <id>http://localhost:$HGPORT/hg-test/pushlog</id>
-   <link rel="self" href="http://localhost:$HGPORT/hg-test/pushlog"/>
-   <link rel="alternate" href="http://localhost:$HGPORT/hg-test/pushloghtml"/>
-   <title>hg-test Pushlog</title>
-   <updated>*</updated> (glob)
    <entry>
     <title>Changeset 5af266358ee895496337d0c6f9646954c607d189</title>
     <id>http://www.selenic.com/mercurial/#changeset-5af266358ee895496337d0c6f9646954c607d189</id>
     <link href="http://localhost:$HGPORT/hg-test/rev/5af266358ee895496337d0c6f9646954c607d189"/>
     <updated>*</updated> (glob)
     <author>
      <name>someone</name>
     </author>
@@ -559,44 +573,16 @@ Get the second page of 10 pushes via pus
      <name>johndoe</name>
     </author>
     <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
       <ul class="filelist"><li class="file">testfile</li></ul>
      </div>
     </content>
    </entry>
-   <entry>
-    <title>Changeset 8a354cb74bae0bcc04550e5335612bbf922ef364</title>
-    <id>http://www.selenic.com/mercurial/#changeset-8a354cb74bae0bcc04550e5335612bbf922ef364</id>
-    <link href="http://localhost:$HGPORT/hg-test/rev/8a354cb74bae0bcc04550e5335612bbf922ef364"/>
-    <updated>*</updated> (glob)
-    <author>
-     <name>someone</name>
-    </author>
-    <content type="xhtml">
-     <div xmlns="http://www.w3.org/1999/xhtml">
-      <ul class="filelist"><li class="file">testfile</li></ul>
-     </div>
-    </content>
-   </entry>
-   <entry>
-    <title>Changeset 1980d3e0c05f3f3785168ea4dbe8da33a9de42ca</title>
-    <id>http://www.selenic.com/mercurial/#changeset-1980d3e0c05f3f3785168ea4dbe8da33a9de42ca</id>
-    <link href="http://localhost:$HGPORT/hg-test/rev/1980d3e0c05f3f3785168ea4dbe8da33a9de42ca"/>
-    <updated>*</updated> (glob)
-    <author>
-     <name>someone</name>
-    </author>
-    <content type="xhtml">
-     <div xmlns="http://www.w3.org/1999/xhtml">
-      <ul class="filelist"><li class="file">testfile</li></ul>
-     </div>
-    </content>
-   </entry>
   
   </feed>
 
 
 Get all ATOM data via pushlog
   $ http "http://localhost:$HGPORT/hg-test/pushlog?startdate=$STARTTIME&enddate=$ENDTIME" --header content-type --body-file body
   200
   content-type: application/atom+xml
@@ -605,16 +591,30 @@ Get all ATOM data via pushlog
   <?xml version="1.0" encoding="ascii"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
    <id>http://localhost:$HGPORT/hg-test/pushlog</id>
    <link rel="self" href="http://localhost:$HGPORT/hg-test/pushlog"/>
    <link rel="alternate" href="http://localhost:$HGPORT/hg-test/pushloghtml"/>
    <title>hg-test Pushlog</title>
    <updated>*</updated> (glob)
    <entry>
+    <title>Changeset 7d352806437fb407ffaa87bcb7d2d79488801c10</title>
+    <id>http://www.selenic.com/mercurial/#changeset-7d352806437fb407ffaa87bcb7d2d79488801c10</id>
+    <link href="http://localhost:$HGPORT/hg-test/rev/7d352806437fb407ffaa87bcb7d2d79488801c10"/>
+    <updated>*</updated> (glob)
+    <author>
+     <name>luser</name>
+    </author>
+    <content type="xhtml">
+     <div xmlns="http://www.w3.org/1999/xhtml">
+      <ul class="filelist"><li class="file">testfile&amp;hello</li></ul>
+     </div>
+    </content>
+   </entry>
+   <entry>
     <title>Changeset 054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</title>
     <id>http://www.selenic.com/mercurial/#changeset-054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</id>
     <link href="http://localhost:$HGPORT/hg-test/rev/054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"/>
     <updated>*</updated> (glob)
     <author>
      <name>johndoe</name>
     </author>
     <content type="xhtml">
@@ -1720,16 +1720,30 @@ Get only the tips as ATOM data from push
   <?xml version="1.0" encoding="ascii"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
    <id>http://localhost:$HGPORT/hg-test/pushlog</id>
    <link rel="self" href="http://localhost:$HGPORT/hg-test/pushlog"/>
    <link rel="alternate" href="http://localhost:$HGPORT/hg-test/pushloghtml"/>
    <title>hg-test Pushlog</title>
    <updated>*</updated> (glob)
    <entry>
+    <title>Changeset 7d352806437fb407ffaa87bcb7d2d79488801c10</title>
+    <id>http://www.selenic.com/mercurial/#changeset-7d352806437fb407ffaa87bcb7d2d79488801c10</id>
+    <link href="http://localhost:$HGPORT/hg-test/rev/7d352806437fb407ffaa87bcb7d2d79488801c10"/>
+    <updated>*</updated> (glob)
+    <author>
+     <name>luser</name>
+    </author>
+    <content type="xhtml">
+     <div xmlns="http://www.w3.org/1999/xhtml">
+      <ul class="filelist"><li class="file">testfile&amp;hello</li></ul>
+     </div>
+    </content>
+   </entry>
+   <entry>
     <title>Changeset 054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</title>
     <id>http://www.selenic.com/mercurial/#changeset-054cf6e47bbe2fb7a3e4061ded6763bed4fd4550</id>
     <link href="http://localhost:$HGPORT/hg-test/rev/054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"/>
     <updated>*</updated> (glob)
     <author>
      <name>johndoe</name>
     </author>
     <content type="xhtml">
@@ -1845,30 +1859,16 @@ Get only the tips as ATOM data from push
      <name>luser</name>
     </author>
     <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
       <ul class="filelist"><li class="file">testfile</li></ul>
      </div>
     </content>
    </entry>
-   <entry>
-    <title>Changeset f4835d42999840c490559b5f933036ee8f2ed6af</title>
-    <id>http://www.selenic.com/mercurial/#changeset-f4835d42999840c490559b5f933036ee8f2ed6af</id>
-    <link href="http://localhost:$HGPORT/hg-test/rev/f4835d42999840c490559b5f933036ee8f2ed6af"/>
-    <updated>*</updated> (glob)
-    <author>
-     <name>johndoe</name>
-    </author>
-    <content type="xhtml">
-     <div xmlns="http://www.w3.org/1999/xhtml">
-      <ul class="filelist"><li class="file">testfile</li></ul>
-     </div>
-    </content>
-   </entry>
   
   </feed>
 
 
 Get some tipsonly ATOM data via pushlog date query
   $ http "http://localhost:$HGPORT/hg-test/pushlog?startdate=$STARTTIME&enddate=$MIDTIME&tipsonly=1" --header content-type --body-file body
   200
   content-type: application/atom+xml
--- a/hgext/pushlog/tests/test-hgweb-feed.t
+++ b/hgext/pushlog/tests/test-hgweb-feed.t
@@ -4,17 +4,17 @@
 
 Sanity check the html output
 
   $ http http://localhost:$HGPORT/hg-test/pushloghtml --header content-type --body-file body
   200
   content-type: text/html; charset=ascii
 
   $ grep 7127e784b4ba body
-  <tr class="pushlogentry parity0  id31"><td></td><td><a href="/hg-test/rev/7127e784b4ba3a5cf792b433b19d527e2bd0b44a">7127e784b4ba3a5cf792b433b19d527e2bd0b44a</a></td><td><strong>johndoe &mdash; checkin 60</strong> <span class="logtags"></span></td></tr>
+  <tr class="pushlogentry parity1  id31"><td></td><td><a href="/hg-test/rev/7127e784b4ba3a5cf792b433b19d527e2bd0b44a">7127e784b4ba3a5cf792b433b19d527e2bd0b44a</a></td><td><strong>johndoe &mdash; checkin 60</strong> <span class="logtags"></span></td></tr>
 
 Get all JSON data
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes?startID=0" --header content-type --body-file body
   200
   content-type: application/json
 
 
@@ -214,16 +214,23 @@ Get all JSON data
       "31": {
           "changesets": [
               "7127e784b4ba3a5cf792b433b19d527e2bd0b44a",
               "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"
           ],
           "date": 1229961000,
           "user": "johndoe"
       },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
+      },
       "4": {
           "changesets": [
               "52d3fce08d691a87d01c8f4397a8b34d98427271",
               "12799c959e3ad5465a98d333408ae8a5296d90a6"
           ],
           "date": 1227541800,
           "user": "johndoe"
       },
@@ -1054,23 +1061,42 @@ Get all JSON data with details
                   "desc": "checkin 61",
                   "files": [
                       "testfile"
                   ],
                   "node": "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550",
                   "parents": [
                       "7127e784b4ba3a5cf792b433b19d527e2bd0b44a"
                   ],
+                  "tags": []
+              }
+          ],
+          "date": 1229961000,
+          "user": "johndoe"
+      },
+      "32": {
+          "changesets": [
+              {
+                  "author": "luser",
+                  "branch": "default",
+                  "desc": "checkin 61",
+                  "files": [
+                      "testfile&hello"
+                  ],
+                  "node": "7d352806437fb407ffaa87bcb7d2d79488801c10",
+                  "parents": [
+                      "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"
+                  ],
                   "tags": [
                       "tip"
                   ]
               }
           ],
-          "date": 1229961000,
-          "user": "johndoe"
+          "date": 1229970000,
+          "user": "luser"
       },
       "4": {
           "changesets": [
               {
                   "author": "johndoe@cuatro",
                   "branch": "default",
                   "desc": "checkin 6",
                   "files": [
@@ -1358,26 +1384,18 @@ Query a changeset that doesn't exist
 Test paging
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes/1?version=2" --header content-type --body-file body
   200
   content-type: application/json
 
   $ python -m json.tool body
   {
-      "lastpushid": 31,
+      "lastpushid": 32,
       "pushes": {
-          "22": {
-              "changesets": [
-                  "59b7f60b3a3464abb7fd3ea2bf1798960136a7fe",
-                  "f4835d42999840c490559b5f933036ee8f2ed6af"
-              ],
-              "date": 1229183400,
-              "user": "johndoe"
-          },
           "23": {
               "changesets": [
                   "773195adc944c860ad0fbb278921a6e2d27f4405",
                   "306b6389a9ad743bc619d5e62ea6a75bb842d09e"
               ],
               "date": 1229269800,
               "user": "luser"
           },
@@ -1439,36 +1457,35 @@ Test paging
           },
           "31": {
               "changesets": [
                   "7127e784b4ba3a5cf792b433b19d527e2bd0b44a",
                   "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"
               ],
               "date": 1229961000,
               "user": "johndoe"
+          },
+          "32": {
+              "changesets": [
+                  "7d352806437fb407ffaa87bcb7d2d79488801c10"
+              ],
+              "date": 1229970000,
+              "user": "luser"
           }
       }
   }
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes/2?version=2" --header content-type --body-file body
   200
   content-type: application/json
 
   $ python -m json.tool body
   {
-      "lastpushid": 31,
+      "lastpushid": 32,
       "pushes": {
-          "12": {
-              "changesets": [
-                  "1980d3e0c05f3f3785168ea4dbe8da33a9de42ca",
-                  "8a354cb74bae0bcc04550e5335612bbf922ef364"
-              ],
-              "date": 1228319400,
-              "user": "someone"
-          },
           "13": {
               "changesets": [
                   "53e334794d36467b2083d3b94fb1dc3f061d1cd9",
                   "93f74182971010ac8a9a5726fb976f1d2e593ea5"
               ],
               "date": 1228405800,
               "user": "johndoe"
           },
@@ -1530,16 +1547,24 @@ Test paging
           },
           "21": {
               "changesets": [
                   "e752ca2d37f753b617382d8def58c090e2cb8ca6",
                   "5af266358ee895496337d0c6f9646954c607d189"
               ],
               "date": 1229140200,
               "user": "someone"
+          },
+          "22": {
+              "changesets": [
+                  "59b7f60b3a3464abb7fd3ea2bf1798960136a7fe",
+                  "f4835d42999840c490559b5f933036ee8f2ed6af"
+              ],
+              "date": 1229183400,
+              "user": "johndoe"
           }
       }
   }
 
 Format version 1 works
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes?changeset=069b8cf8dcac&version=1" --header content-type --body-file body
   200
@@ -1572,17 +1597,17 @@ Format version 3 fails
 Format version 2 has pushes in a child object and a last push id
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes?changeset=069b8cf8dcac&version=2" --header content-type --body-file body
   200
   content-type: application/json
 
   $ python -m json.tool  body
   {
-      "lastpushid": 31,
+      "lastpushid": 32,
       "pushes": {
           "19": {
               "changesets": [
                   "868ec41cad32bb84115253e226c88605b8f9f354",
                   "069b8cf8dcac61e0771c795e8ffe8fcab2608233"
               ],
               "date": 1229010600,
               "user": "johndoe"
--- a/hgext/pushlog/tests/test-hgweb-user-queries.t
+++ b/hgext/pushlog/tests/test-hgweb-user-queries.t
@@ -74,16 +74,23 @@ Query for an individual user's pushes
       "29": {
           "changesets": [
               "2012c9f3b92d8153fd36f7388802a5e59527bf57",
               "9fef10362adc35e72dfb3f38d6e540ef2bde785e"
           ],
           "date": 1229788200,
           "user": "luser"
       },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
+      },
       "5": {
           "changesets": [
               "f1af4004fca66aaf0938f50daffa9d24bbbe3f07",
               "0341cfc3072ffd468facf73e47f8624079616bfc"
           ],
           "date": 1227714600,
           "user": "luser"
       },
@@ -324,16 +331,23 @@ Query for two users' pushes
       "30": {
           "changesets": [
               "354174f3ddf9b07f9dd0670b698c97b59dfa78ea",
               "f3fbe77f4d47e4cc9c1f0ccb32257adaa84f96cc"
           ],
           "date": 1229874600,
           "user": "someone"
       },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
+      },
       "5": {
           "changesets": [
               "f1af4004fca66aaf0938f50daffa9d24bbbe3f07",
               "0341cfc3072ffd468facf73e47f8624079616bfc"
           ],
           "date": 1227714600,
           "user": "luser"
       },
@@ -453,16 +467,23 @@ Querying for all users' pushes + a start
       },
       "31": {
           "changesets": [
               "7127e784b4ba3a5cf792b433b19d527e2bd0b44a",
               "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"
           ],
           "date": 1229961000,
           "user": "johndoe"
+      },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
       }
   }
 
 
   $ http "http://localhost:$HGPORT/hg-test/json-pushes?startID=20" --header content-type --body-file body
   200
   content-type: application/json
 
@@ -550,16 +571,23 @@ Querying for all users' pushes + a start
       },
       "31": {
           "changesets": [
               "7127e784b4ba3a5cf792b433b19d527e2bd0b44a",
               "054cf6e47bbe2fb7a3e4061ded6763bed4fd4550"
           ],
           "date": 1229961000,
           "user": "johndoe"
+      },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
       }
   }
 
 
 Query for a user and a startdate
   $ http "http://localhost:$HGPORT/hg-test/json-pushes?user=luser&startdate=$MIDTIME" --header content-type --body-file body
   200
   content-type: application/json
@@ -617,16 +645,23 @@ Query for a user and a startdate
       "29": {
           "changesets": [
               "2012c9f3b92d8153fd36f7388802a5e59527bf57",
               "9fef10362adc35e72dfb3f38d6e540ef2bde785e"
           ],
           "date": 1229788200,
           "user": "luser"
       },
+      "32": {
+          "changesets": [
+              "7d352806437fb407ffaa87bcb7d2d79488801c10"
+          ],
+          "date": 1229970000,
+          "user": "luser"
+      },
       "5": {
           "changesets": [
               "f1af4004fca66aaf0938f50daffa9d24bbbe3f07",
               "0341cfc3072ffd468facf73e47f8624079616bfc"
           ],
           "date": 1227714600,
           "user": "luser"
       },
--- a/hgtemplates/atom/map
+++ b/hgtemplates/atom/map
@@ -2,17 +2,17 @@ default = 'changelog'
 feedupdated = '<updated>{date|rfc3339date}</updated>'
 mimetype = 'application/atom+xml; charset={encoding}'
 header = header.tmpl
 changelog = changelog.tmpl
 changelogentry = changelogentry.tmpl
 filelog = filelog.tmpl
 pushlog = pushlog.tmpl
 pushlogentry = pushlogentry.tmpl
-pushlogfile = '<li class="file">{name}</li>'
+pushlogfile = '<li class="file">{name|escape}</li>'
 tags = tags.tmpl
 tagentry = tagentry.tmpl
 bookmarks = bookmarks.tmpl
 bookmarkentry = bookmarkentry.tmpl
 branches = branches.tmpl
 branchentry = branchentry.tmpl
 error = error.tmpl
 filedifflink = '{file|escape}<br />'