Permalink
Browse files

fixing more miscallaneous html errors

  • Loading branch information...
1 parent 09eb39a commit 289ec938f0389e1050de8953d5356c8aa834c9c6 @pkra pkra committed Dec 15, 2011
Showing with 15 additions and 15 deletions.
  1. +1 −1 categoryview.py
  2. +1 −1 dateview.py
  3. +1 −1 dateviewhisartvis.py
  4. +1 −1 dateviewresearch.py
  5. +1 −1 dateviewteacher.py
  6. +1 −1 feedhandler.py
  7. +2 −2 planetmo.py
  8. +1 −1 planettag.py
  9. +5 −5 statsview.py
  10. +1 −1 weeklypicks.py
View
2 categoryview.py
@@ -21,7 +21,7 @@ def generateSection(self,pair):
for entry in Post.gql("WHERE homepage = :1 ORDER BY timestamp_created DESC LIMIT 7", feed.homepage):
output.append("""
<li><a href="%(link)s" title="%(title)s">%(title)s</a></li>
- """ % {'link': entry.link, 'title': html_escape(entry.title)})
+ """ % {'link': html_escape(entry.link), 'title': html_escape(entry.title)})
output.append("""
</ul> </div> </li>
""")
View
2 dateview.py
@@ -48,5 +48,5 @@ def generateContent(self):
<a href="%(link)s" title="%(title)s">%(title)s</a>
</div>
</td>
- </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': post.link }
+ </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': html_escape(post.link) }
return s + "</tbody></table>"
View
2 dateviewhisartvis.py
@@ -48,5 +48,5 @@ def generateContent(self):
<a href="%(link)s" title="%(title)s">%(title)s</a>
</div>
</td>
- </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': post.link }
+ </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': html_escape(post.link) }
return s + "</tbody></table>"
View
2 dateviewresearch.py
@@ -48,5 +48,5 @@ def generateContent(self):
<a href="%(link)s" title="%(title)s">%(title)s</a>
</div>
</td>
- </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': post.link }
+ </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': html_escape(post.link) }
return s + "</tbody></table>"
View
2 dateviewteacher.py
@@ -48,5 +48,5 @@ def generateContent(self):
<a href="%(link)s" title="%(title)s">%(title)s</a>
</div>
</td>
- </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': post.link }
+ </tr>""" % {'time': post.printShortTime_created(), 'homepage': post.homepage, 'service': html_escape(post.service), 'title': html_escape(post.title), 'link': html_escape(post.link) }
return s + "</tbody></table>"
View
2 feedhandler.py
@@ -28,7 +28,7 @@ def generatePage(self):
<updated>%(tupdated)s</updated>
<id>%(link)s</id>
<content type="html"> %(content_trunc)s [Length: approx %(length)d words.] </content>
- </entry>""" % {'service': html_escape(entry.service),'title': entry.title, 'homepage': entry.homepage , 'link':entry.link, 'tcreated': entry.printTime_created_rfc3339(), 'tupdated':entry.printTime_updated_rfc3339(), 'length': entry.length/5, 'content_trunc': truncate_html_words(entry.content, 40)} )
+ </entry>""" % {'service': html_escape(entry.service),'title': html_escape(entry.title), 'homepage': html_escape(entry.homepage) , 'link':html_escape(entry.link), 'tcreated': entry.printTime_created_rfc3339(), 'tupdated':entry.printTime_updated_rfc3339(), 'length': entry.length/5, 'content_trunc': truncate_html_words(entry.content, 40)} )
output.append("</feed>")
return "".join(output)
View
4 planetmo.py
@@ -16,9 +16,9 @@ def generateContent(self):
<div class="planetsubtitle">Posted on <a href="%(homepage)s" title="%(service)s">%(service)s</a> at %(tcreated)s.
</div>
<div class="planettags">
- <i>Tags:</i> """ % {"link":entry.link, "title":entry.title, "homepage":entry.homepage, "service":html_escape(entry.service), "tcreated":entry.printShortTime_created()} )
+ <i>Tags:</i> """ % {"link":html_escape(entry.link), "title":html_escape(entry.title), "homepage":html_escape(entry.homepage), "service":html_escape(entry.service), "tcreated":entry.printShortTime_created()} )
for tag in entry.tags:
- output.append(tag)
+ output.append(html_escape(tag))
output.append(", ")
output.append( """ </div>
</div>
View
2 planettag.py
@@ -56,7 +56,7 @@ def generateContent(self):
var word_list = [ """ )
for tag_weight in weighted_taglist:
if tag_weight[0] != "Uncategorized" and tag_weight[0] != "Uncategorized>" and tag_weight[0] != "Mathematics" and tag_weight[0] != "Math" and tag_weight[0] != "Maths" and tag_weight[0] != "Http://gdata.youtube.com/schemas/2007#video" and repr(tag_weight[0]) != repr(u'Matem\xe1ticas') and tag_weight[0] != "Matematica" and tag_weight[1]>10 :
- output.append(""" {text: "%(text)s", weight: %(weight)s, url: "/planettag?content=%(text)s"}, """ % {"text":tag_weight[0], "weight": tag_weight[1] } )
+ output.append(""" {text: "%(text)s", weight: %(weight)s, url: "/planettag?content=%(text)s"}, """ % {"text":html_escape(tag_weight[0]), "weight": tag_weight[1] } )
output.append( """
];
window.onload = function() {
View
10 statsview.py
@@ -27,7 +27,7 @@ def generateContent(self):
</th>
</tr>
</thead>
- <tbody>"""% {'title':self.selftitle})
+ <tbody>"""% {'title':html_escape(self.selftitle)})
for feed in self.query():
output.append("""
<tr>
@@ -37,7 +37,7 @@ def generateContent(self):
<td valign="bottom" class="blogcolumn">
<a href="%(homepage)s">%(title)s</a>
</td>
- </tr>""" % {'comments_day': str(feed.comments_day), 'homepage': feed.homepage, 'title': html_escape(feed.title) })
+ </tr>""" % {'comments_day': str(feed.comments_day), 'homepage': html_escape(feed.homepage), 'title': html_escape(feed.title) })
output.append("""
</tbody>
</table>""")
@@ -63,7 +63,7 @@ def generateContent(self):
<td valign="bottom" class="blogcolumn">
<a href="%(homepage)s">%(title)s</a>
</td>
- </tr>""" % {'comments_week': str(feed.comments_week), 'homepage': feed.homepage, 'title': html_escape(feed.title) })
+ </tr>""" % {'comments_week': str(feed.comments_week), 'homepage': html_escape(feed.homepage), 'title': html_escape(feed.title) })
output.append("""
</tbody>
</table>""")
@@ -89,7 +89,7 @@ def generateContent(self):
<td valign="bottom" class="blogcolumn">
<a href="%(homepage)s">%(title)s</a>
</td>
- </tr>""" % {'posts_week': str(feed.posts_week), 'homepage': feed.homepage, 'title': html_escape(feed.title) })
+ </tr>""" % {'posts_week': str(feed.posts_week), 'homepage': html_escape(feed.homepage), 'title': html_escape(feed.title) })
output.append("""
</tbody>
</table>""")
@@ -115,7 +115,7 @@ def generateContent(self):
<td valign="bottom" class="blogcolumn">
<a href="%(homepage)s">%(title)s</a>
</td>
- </tr>""" % {'posts_month': str(feed.posts_month), 'homepage': feed.homepage, 'title': html_escape(feed.title) })
+ </tr>""" % {'posts_month': str(feed.posts_month), 'homepage': html_escape(feed.homepage), 'title': html_escape(feed.title) })
output.append("""
</tbody>
</table>""")
View
2 weeklypicks.py
@@ -15,7 +15,7 @@ def generateContent(self):
<h2><a href="%(link)s" title="%(title)s">%(title)s</a></h2>
<div class="planetsubtitle">Posted %(tcreated)s.
</div>
- <div class="planettags"> """ % {"link":entry.link, "title":entry.title, "homepage":entry.homepage, "tcreated":entry.printShortTime_created()} )
+ <div class="planettags"> """ % {"link":html_escape(entry.link), "title":html_escape(entry.title), "homepage":html_escape(entry.homepage), "tcreated":entry.printShortTime_created()} )
output.append( """ </div>
</div>
<div class="planetbody">

0 comments on commit 289ec93

Please sign in to comment.