Skip to content

Commit

Permalink
fix: unable to centre images via editor (#3560)
Browse files Browse the repository at this point in the history
  • Loading branch information
samerton authored Dec 1, 2024
1 parent f84a0e4 commit e9f0523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/classes/Core/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public static function getPurified(?string $input, bool $escape_invalid = false)
$purifierConfig->set('HTML.Doctype', 'XHTML 1.0 Transitional');
$purifierConfig->set('URI.DisableExternalResources', false);
$purifierConfig->set('URI.DisableResources', false);
$purifierConfig->set('HTML.Allowed', 'u,a,p,b,i,small,blockquote,span[style],span[class],p,strong,em,li,ul,ol,div[align],br,img,figure,figcaption');
$purifierConfig->set('CSS.AllowedProperties', ['text-align', 'display', 'float', 'color', 'background-color', 'background', 'font-size', 'font-family', 'text-decoration', 'font-weight', 'font-style', 'font-size', 'vertical-align']);
$purifierConfig->set('HTML.Allowed', 'u,a,p,p[style],b,i,small,blockquote,span[style],span[class],p,strong,em,li,ul,ol,div[align],br,img,figure,figcaption');
$purifierConfig->set('CSS.AllowedProperties', ['text-align', 'display', 'float', 'color', 'background-color', 'background', 'font-size', 'font-family', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'text-decoration', 'font-weight', 'font-style', 'font-size', 'vertical-align']);
$purifierConfig->set('CSS.AllowTricky', true);
$purifierConfig->set('HTML.AllowedAttributes', 'target, rel, href, id, src, height, width, alt, class, *.style');
$purifierConfig->set('HTML.AllowedAttributes', 'target, rel, href, id, src, height, width, alt, class, *.style, dir');
$purifierConfig->set('Attr.AllowedFrameTargets', ['_blank', '_self', '_parent', '_top']);
$purifierConfig->set('Attr.AllowedRel', ['noopener', 'nofollow']);
$purifierConfig->set('HTML.SafeIframe', true);
Expand Down

0 comments on commit e9f0523

Please sign in to comment.