0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

feat: transform deprecated width attribute (#306)

* Transform deprecated col@width attribute

* Transform deprecated table@width attribute

* reformat
This commit is contained in:
Kieran 2021-12-24 02:26:14 +00:00 committed by GitHub
parent 996eaf4331
commit 41fc223f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,9 +168,11 @@ class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule
// @vspace for img ------------------------------------------------ // @vspace for img ------------------------------------------------
$r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace'); $r['img@vspace'] = new HTMLPurifier_AttrTransform_ImgSpace('vspace');
// @width for hr, td, th ------------------------------------------ // @width for table, hr, td, th, col ------------------------------------------
$r['table@width'] =
$r['td@width'] = $r['td@width'] =
$r['th@width'] = $r['th@width'] =
$r['col@width'] =
$r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width'); $r['hr@width'] = new HTMLPurifier_AttrTransform_Length('width');
return $r; return $r;