diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java
index 36099f7c4..dfcb9a7c5 100644
--- a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java
+++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java
@@ -362,6 +362,15 @@ public class Xoh_html_wtr {
case Xop_xnde_tag_.Tid__mapframe:
case Xop_xnde_tag_.Tid__maplink:
case Xop_xnde_tag_.Tid__template_styles:
+
+ // added new tags below; ISSUE#:636 DATE:2020-03-08
+ case Xop_xnde_tag_.Tid__audio:
+ case Xop_xnde_tag_.Tid__video:
+ case Xop_xnde_tag_.Tid__track:
+ case Xop_xnde_tag_.Tid__rtc:
+ case Xop_xnde_tag_.Tid__figure:
+ case Xop_xnde_tag_.Tid__figure_inline:
+ case Xop_xnde_tag_.Tid__figcaption:
Xox_xnde xtn = xnde.Xnde_xtn();
xtn.Xtn_write(bfr, app, ctx, this, hctx, page, xnde, src);
break;
diff --git a/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xatr_whitelist_mgr.java b/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xatr_whitelist_mgr.java
index 1f24105d1..521d41133 100644
--- a/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xatr_whitelist_mgr.java
+++ b/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xatr_whitelist_mgr.java
@@ -52,21 +52,82 @@ public class Xop_xatr_whitelist_mgr {
}
return rv;
}
- public Xop_xatr_whitelist_mgr Ini() { // REF.MW:Sanitizer.php|setupAttributeWhitelist
- Ini_grp("common" , null , "id", "class", "lang", "dir", "title", "style", "role");
- Ini_grp("block" , "common" , "align");
- Ini_grp("tablealign" , null , "align", "char", "charoff", "valign");
- Ini_grp("tablecell" , null , "abbr", "axis", "headers", "scope", "rowspan", "colspan", "nowrap", "width", "height", "bgcolor");
+ // REF.MW:Sanitizer.php|setupAttributeWhitelist
+ public Xop_xatr_whitelist_mgr Ini() {
+ // REF.MW: https://github.com/wikimedia/mediawiki/blob/master/includes/parser/Sanitizer.php#L1767
+ Ini_grp("common", null,
+ // HTML
+ "id",
+ "class",
+ "style",
+ "lang",
+ "dir",
+ "title",
+
+ // WAI-ARIA
+ "aria-describedby",
+ "aria-flowto",
+ "aria-hidden",
+ "aria-label",
+ "aria-labelledby",
+ "aria-owns",
+ "role",
+
+ // RDFa
+ // These attributes are specified in section 9 of
+ // https://www.w3.org/TR/2008/REC-rdfa-syntax-20081014
+ "about",
+ "property",
+ "resource",
+ "datatype",
+ "type"+"of",
+
+ // Microdata. These are specified by
+ // https://html.spec.whatwg.org/multipage/microdata.html#the-microdata-model
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype"
+ );
+ Ini_grp("block" , "common" , "align");
+ Ini_grp("tablealign" , null , "align", "valign");
+ Ini_grp("tablecell" , null,
+ "abbr",
+ "axis",
+ "headers",
+ "scope",
+ "rowspan",
+ "colspan",
+ "nowrap", // deprecated
+ "width", // deprecated
+ "height", // deprecated
+ "bgcolor" // deprecated
+ );
+
+ // Numbers refer to sections in HTML 4.01 standard describing the element.
+ // See: https://www.w3.org/TR/html4/
+ // 7.5.4
Ini_nde(Xop_xnde_tag_.Tid__div , "block");
- Ini_nde(Xop_xnde_tag_.Tid__center , "common");
+ Ini_nde(Xop_xnde_tag_.Tid__center , "common"); // deprecated
Ini_nde(Xop_xnde_tag_.Tid__span , "block");
+
+ // 7.5.5
Ini_nde(Xop_xnde_tag_.Tid__h1 , "block");
Ini_nde(Xop_xnde_tag_.Tid__h2 , "block");
Ini_nde(Xop_xnde_tag_.Tid__h3 , "block");
Ini_nde(Xop_xnde_tag_.Tid__h4 , "block");
Ini_nde(Xop_xnde_tag_.Tid__h5 , "block");
Ini_nde(Xop_xnde_tag_.Tid__h6 , "block");
+
+ // 7.5.6
+ // address
+
+ // 8.2.4
+ Ini_nde(Xop_xnde_tag_.Tid__bdo , "common");
+
+ // 9.2.1
Ini_nde(Xop_xnde_tag_.Tid__em , "common");
Ini_nde(Xop_xnde_tag_.Tid__strong , "common");
Ini_nde(Xop_xnde_tag_.Tid__cite , "common");
@@ -76,32 +137,81 @@ public class Xop_xatr_whitelist_mgr {
Ini_nde(Xop_xnde_tag_.Tid__kbd , "common");
Ini_nde(Xop_xnde_tag_.Tid__var , "common");
Ini_nde(Xop_xnde_tag_.Tid__abbr , "common");
+ // acronym
+
+ // 9.2.2
Ini_nde(Xop_xnde_tag_.Tid__blockquote , "common", "cite");
+ Ini_nde(Xop_xnde_tag_.Tid__q , "common", "cite");
+
+ // 9.2.3
Ini_nde(Xop_xnde_tag_.Tid__sub , "common");
Ini_nde(Xop_xnde_tag_.Tid__sup , "common");
+
+ // 9.3.1
Ini_nde(Xop_xnde_tag_.Tid__p , "block");
- Ini_nde(Xop_xnde_tag_.Tid__br , "id", "class", "title", "style", "clear");
+
+ // 9.3.2
+ Ini_nde(Xop_xnde_tag_.Tid__br , "common", "clear");
+
+ // https://www.w3.org/TR/html5/text-level-semantics.html#the-wbr-element
+ Ini_nde(Xop_xnde_tag_.Tid__wbr , "common");
+
+ // 9.3.4
Ini_nde(Xop_xnde_tag_.Tid__pre , "common", "width");
+
+ // 9.4
Ini_nde(Xop_xnde_tag_.Tid__ins , "common", "cite", "datetime");
Ini_nde(Xop_xnde_tag_.Tid__del , "common", "cite", "datetime");
+
+ // 10.2
Ini_nde(Xop_xnde_tag_.Tid__ul , "common", "type");
- Ini_nde(Xop_xnde_tag_.Tid__ol , "common", "type", "start");
+ Ini_nde(Xop_xnde_tag_.Tid__ol , "common", "type", "start", "reversed");
Ini_nde(Xop_xnde_tag_.Tid__li , "common", "type", "value");
+
+ // 10.3
Ini_nde(Xop_xnde_tag_.Tid__dl , "common");
Ini_nde(Xop_xnde_tag_.Tid__dd , "common");
Ini_nde(Xop_xnde_tag_.Tid__dt , "common");
+
+ // 11.2.1
Ini_nde(Xop_xnde_tag_.Tid__table , "common", "summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding", "align", "bgcolor");
- Ini_nde(Xop_xnde_tag_.Tid__caption , "common", "align");
- Ini_nde(Xop_xnde_tag_.Tid__thead , "common", "tablealign");
- Ini_nde(Xop_xnde_tag_.Tid__tfoot , "common", "tablealign");
- Ini_nde(Xop_xnde_tag_.Tid__tbody , "common", "tablealign");
- Ini_nde(Xop_xnde_tag_.Tid__colgroup , "common", "span", "width", "tablealign");
- Ini_nde(Xop_xnde_tag_.Tid__col , "common", "span", "width", "tablealign");
+
+ // 11.2.2
+ Ini_nde(Xop_xnde_tag_.Tid__caption , "block");
+
+ // 11.2.3
+ Ini_nde(Xop_xnde_tag_.Tid__thead , "common");
+ Ini_nde(Xop_xnde_tag_.Tid__tfoot , "common");
+ Ini_nde(Xop_xnde_tag_.Tid__tbody , "common");
+
+ // 11.2.4
+ Ini_nde(Xop_xnde_tag_.Tid__colgroup , "common", "span");
+ Ini_nde(Xop_xnde_tag_.Tid__col , "common", "span");
+
+ // 11.2.5
Ini_nde(Xop_xnde_tag_.Tid__tr , "common", "bgcolor", "tablealign");
+
+ // 11.2.6
Ini_nde(Xop_xnde_tag_.Tid__td , "common", "tablecell", "tablealign");
Ini_nde(Xop_xnde_tag_.Tid__th , "common", "tablecell", "tablealign");
- Ini_nde(Xop_xnde_tag_.Tid__a , "common", "href", "rel", "rev");
- Ini_nde(Xop_xnde_tag_.Tid__img , "common", "alt", "src", "width", "height");
+
+ // 12.2
+ // NOTE: is not allowed directly, but the attrib
+ // whitelist is used from the Parser Object
+ Ini_nde(Xop_xnde_tag_.Tid__a , "common", "href", "rel", "rev"); // # rel/rev esp. for RDFa
+
+ // 13.2
+ // Not usually allowed, but may be used for extension-style hooks
+ // such as