Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1873)

Unified Diff: appengine/monorail/templates/tracker/render-rich-text.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/templates/tracker/render-rich-text.ezt
diff --git a/appengine/monorail/templates/tracker/render-rich-text.ezt b/appengine/monorail/templates/tracker/render-rich-text.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..1d44902c1d0b4d463e4fa77fe18a32e5d4a73400
--- /dev/null
+++ b/appengine/monorail/templates/tracker/render-rich-text.ezt
@@ -0,0 +1,10 @@
+[# Safely display some text that includes some markup. Only the tags
+ that we explicitly whitelist are allowed, everything else gets
+ escaped.
+
+ description.text_runs is a list of element EZT objects that have a
+ tag and content and maybe some other attributes.
+
+ We do not use extra whitespace in this template because it
+ generates text into a context where whitespace is significant.
+][is arg0.tag ""][arg0.content][end][is arg0.tag "a"]<a href="[arg0.href]" title="[arg0.title]" class="[arg0.css_class]" rel="nofollow">[arg0.content]</a>[end][is arg0.tag "b"]<b>[arg0.content]</b>[end]

Powered by Google App Engine
This is Rietveld 408576698