From 1255d0f15d1fa4996b16c3e28a6e5da13ea6db91 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 25 Dec 2011 03:25:38 -0500 Subject: [PATCH] Add support for scope attribute on td and th. Signed-off-by: Edward Z. Yang --- NEWS | 1 + docs/dev-progress.html | 2 +- library/HTMLPurifier/HTMLModule/Tables.php | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 32725792..4df76546 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier 4.3.1, unknown release date # URI.Munge now munges URIs inside the same host that go from https to http. Reported by Neike Taika-Tessaro. +! Added support for 'scope' attribute on tables. - Color keywords are now case insensitive. Thanks Yzmir Ramirez for reporting. - Explicitly initialize anonModule variable to null. diff --git a/docs/dev-progress.html b/docs/dev-progress.html index 714665b1..105896ed 100644 --- a/docs/dev-progress.html +++ b/docs/dev-progress.html @@ -255,7 +255,7 @@ Mozilla on inside and needs -moz-outline, no IE support. axisTD, THW3C only: No browser implementation charCOL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TRW3C only: No browser implementation headersTD, THW3C only: No browser implementation -scopeTD, THW3C only: No browser implementation +scopeTD, THW3C only: No browser implementation diff --git a/library/HTMLPurifier/HTMLModule/Tables.php b/library/HTMLPurifier/HTMLModule/Tables.php index f314ced3..45c42bb3 100644 --- a/library/HTMLPurifier/HTMLModule/Tables.php +++ b/library/HTMLPurifier/HTMLModule/Tables.php @@ -37,6 +37,9 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule 'abbr' => 'Text', 'colspan' => 'Number', 'rowspan' => 'Number', + // Apparently, as of HTML5 this attribute only applies + // to 'th' elements. + 'scope' => 'Enum#row,col,rowgroup,colgroup', ), $cell_align );