changeset 76:3936385d6c16

http: and https: URLs are now allowed again in tiny bio markdown.
author Atul Varma <avarma@mozilla.com>
date Wed, 30 Jun 2010 14:38:53 -0700
parents 170cd1109ea6
children bd006fdd172f
files static-files/js/index.js
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/static-files/js/index.js	Wed Jun 30 14:23:18 2010 -0700
+++ b/static-files/js/index.js	Wed Jun 30 14:38:53 2010 -0700
@@ -125,7 +125,11 @@
         if (person.bio) {
           var converter = new Showdown.converter();
           var unsafeHtml = converter.makeHtml(person.bio);
-          var safeHtml = html_sanitize(unsafeHtml);
+          var safeHtml = html_sanitize(
+            unsafeHtml,
+            function urlPolicy(url) {
+              return isUrlSafe(url) ? url : null;
+            });
           elem.find(".bio").html(safeHtml);
         } else
           elem.find(".bio").remove();