htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

Style attribute 'page-break-after' is not supported

Open SergioReis97 opened this issue 7 years ago • 5 comments

Getting this message when trying to use page-break css atributes.

Style attribute 'page-break-after' is not supported (for information on implementing this, see the support forums)

Using this package which seems to be a wrapper around htmlpurifier.

using

 'HTML.Allowed' => 'div[style] ....',
 'CSS.AllowedProperties' => 'page-break-after,page-break-before,....',

SergioReis97 avatar Feb 09 '18 12:02 SergioReis97

Still same. Did anyone find any solution? @SergioReis97 ?

bhaskardabhiplus91 avatar Jan 29 '21 07:01 bhaskardabhiplus91

Needs to be implemented. Will be something in CSSDefinition.php

ezyang avatar Jan 29 '21 15:01 ezyang

This seems to be already resolved https://github.com/ezyang/htmlpurifier/blob/1354e7e8c558dc9ae353e07b8cde7ab0d46e7a25/library/HTMLPurifier/CSSDefinition.php#L407

smitalv avatar Apr 20 '21 08:04 smitalv

CSS.Proprietary needs to be set to true for this property to be allowed.

comp500 avatar Jan 05 '22 03:01 comp500

break-after got added to CSS3 so a PR that makes page-break-after an alias to break-faster (transforming from the former to the latter) would be accepted (then CSS.Proprietary wouldn't be needed).

ezyang avatar Jan 28 '22 01:01 ezyang