We are currently testing AMP for our custom post types. Unfortunately a lot of our texts have a <p style=”text-transform:justify”> in front of it. AMP does not allow any inline styling. We have about 240 entries so it would be a lot of work to undo/remove all of the inline-styles manually. Is there a possible to remove all “style=”text-transform:justify” within a <p>-tag?
thanks a lot!
I solved it myself with the following code:
$text = get_field('einleitungstext');
$text = str_replace('<p style="text-align: justify;">', '<p>', $text);