From 97fc281a7134dd5937c9e7f1a113b5195bba72df Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sun, 23 Dec 2007 10:25:04 -0500 Subject: [PATCH 1/3] Twitter countermeasures --- filters/notweets.py | 6 ++++++ themes/asf/index.html.xslt | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 filters/notweets.py diff --git a/filters/notweets.py b/filters/notweets.py new file mode 100644 index 0000000..5be6dd5 --- /dev/null +++ b/filters/notweets.py @@ -0,0 +1,6 @@ +#remove all tweets +import sys + +data = sys.stdin.read() +if data.find('tag:twitter.com,') < 0: + sys.stdout.write(data) diff --git a/themes/asf/index.html.xslt b/themes/asf/index.html.xslt index bdc54c0..8901d4c 100644 --- a/themes/asf/index.html.xslt +++ b/themes/asf/index.html.xslt @@ -108,7 +108,13 @@ - + + + + + + + @@ -189,7 +195,14 @@ - + + + + + + + From eb3e21b0bc6afd923140e961512e5333cf827682 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 4 Feb 2008 18:33:18 -0600 Subject: [PATCH 2/3] Support math:mfenced and svg:foreignObject --- planet/vendor/feedparser.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/planet/vendor/feedparser.py b/planet/vendor/feedparser.py index 44921e2..1d702ed 100755 --- a/planet/vendor/feedparser.py +++ b/planet/vendor/feedparser.py @@ -2333,13 +2333,30 @@ class _HTMLSanitizer(_BaseHTMLProcessor): valid_css_values = re.compile('^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|' + '\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$') +<<<<<<< TREE + mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math', + 'merror', 'mfenced', 'mfrac', 'mi', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', + 'mphantom', 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', + 'msub', 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', +======= mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math', 'merror', 'mfrac', 'mi', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub', 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', +>>>>>>> MERGE-SOURCE 'munderover', 'none', 'semantics'] mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign', +<<<<<<< TREE + 'columnalign', 'close', 'columnlines', 'columnspacing', 'columnspan', 'depth', + 'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows', + 'fence', 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', + 'lspace', 'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', + 'maxsize', 'minsize', 'open', 'other', 'rowalign', 'rowalign', 'rowalign', + 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection', + 'separator', 'separators', 'stretchy', 'width', 'width', 'xlink:href', + 'xlink:show', 'xlink:type', 'xmlns', 'xmlns:xlink'] +======= 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth', 'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows', 'fence', 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', @@ -2348,11 +2365,12 @@ class _HTMLSanitizer(_BaseHTMLProcessor): 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection', 'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show', 'xlink:type', 'xmlns', 'xmlns:xlink'] +>>>>>>> MERGE-SOURCE # svgtiny - foreignObject + linearGradient + radialGradient + stop svg_elements = ['a', 'animate', 'animateColor', 'animateMotion', - 'animateTransform', 'circle', 'defs', 'desc', 'ellipse', 'font-face', - 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern', + 'animateTransform', 'circle', 'defs', 'desc', 'ellipse', 'foreignObject', + 'font-face', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern', 'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph', 'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use'] From e5ebb0d364b64705753e093be7ca4a2587ed58d4 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 4 Feb 2008 19:10:03 -0600 Subject: [PATCH 3/3] Hope this is better... --- planet/vendor/feedparser.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/planet/vendor/feedparser.py b/planet/vendor/feedparser.py index 1d702ed..d560292 100755 --- a/planet/vendor/feedparser.py +++ b/planet/vendor/feedparser.py @@ -2333,21 +2333,13 @@ class _HTMLSanitizer(_BaseHTMLProcessor): valid_css_values = re.compile('^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|' + '\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$') -<<<<<<< TREE mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math', 'merror', 'mfenced', 'mfrac', 'mi', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub', 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', -======= - mathml_elements = ['annotation', 'annotation-xml', 'maction', 'math', - 'merror', 'mfrac', 'mi', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', - 'mphantom', 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', - 'msub', 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', ->>>>>>> MERGE-SOURCE 'munderover', 'none', 'semantics'] mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign', -<<<<<<< TREE 'columnalign', 'close', 'columnlines', 'columnspacing', 'columnspan', 'depth', 'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows', 'fence', 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', @@ -2356,16 +2348,6 @@ class _HTMLSanitizer(_BaseHTMLProcessor): 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection', 'separator', 'separators', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show', 'xlink:type', 'xmlns', 'xmlns:xlink'] -======= - 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth', - 'display', 'displaystyle', 'encoding', 'equalcolumns', 'equalrows', - 'fence', 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', - 'lspace', 'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', - 'maxsize', 'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', - 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection', - 'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show', - 'xlink:type', 'xmlns', 'xmlns:xlink'] ->>>>>>> MERGE-SOURCE # svgtiny - foreignObject + linearGradient + radialGradient + stop svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',