You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/09/28 19:32:51 UTC

[2/2] allura git commit: Restore srcset support for img tags in HTML

Restore srcset support for img tags in HTML


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/49252b39
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/49252b39
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/49252b39

Branch: refs/heads/master
Commit: 49252b397ce735a791f928c30bd39b67b7d52899
Parents: da4d994
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Sep 28 19:27:08 2018 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Sep 28 19:27:08 2018 +0000

----------------------------------------------------------------------
 Allura/allura/lib/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/49252b39/Allura/allura/lib/utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index cf54ea5..dcf4b79 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -591,7 +591,7 @@ class ForgeHTMLSanitizerFilter(html5lib.filters.sanitizer.Filter):
         self.allowed_elements = set(html5lib.filters.sanitizer.allowed_elements) - _form_elements
 
         # srcset is used in our own project_list/project_summary widgets which are used as macros so go through markdown
-        self.allowed_attributes = html5lib.filters.sanitizer.allowed_attributes | {'srcset', (None, 'data-src')}
+        self.allowed_attributes = html5lib.filters.sanitizer.allowed_attributes | {(None, 'srcset'), (None, 'data-src')}
 
         self.valid_iframe_srcs = ('https://www.youtube.com/embed/', 'https://www.gittip.com/')
         self._prev_token_was_ok_iframe = False