• Resolved sheridanbeer

    (@sheridanbeer)


    I have been trying to align the images that i have put into the custom product email in the center of the page.

    To do this i have used the following code: <img src="https://www.koanga.org.nz/gardens/files/2017/08/KI_ME_fruit.jpg" align="center">

    However after updating the page and the $allowed_html array has been run over my code the style to align is sanitized and i am left with: <img src="https://www.koanga.org.nz/gardens/files/2017/08/KI_ME_fruit.jpg">

    Please help

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sheridanbeer

    (@sheridanbeer)

    i can allow the align style class in the $allowed_html array by adding:

    'img' => array(
    				'title' => array(),
    				'class' => array(),
    				'style' => array(),
    				'src' => array(),
    				'align' => array(),

    But this does not make it work, do i need to add more code somewhere else to allow me to align the images properly?

    Plugin Author alexmustin

    (@alexmustin)

    Hey sheridanbeer,

    I’ll look into this and get back to you ASAP.

    Thanks!

    Plugin Author alexmustin

    (@alexmustin)

    Hi sheridanbeer,

    I’m not sure why you couldn’t get that to work — maybe it has to do with the extra comma at the end… I was able to get it to work using the following code:

    'img' => array(
        'title' => array(),
        'class' => array(),
        'style' => array(),
        'align' => array(),
        'src' => array()
    ),

    See the following screenshots:

    Anyway, I’ve updated the plugin to a new version 1.0.2 which fixes this issue.

    Enjoy!

    • This reply was modified 7 years, 2 months ago by alexmustin.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘inline styles on “img” class are being sanitized’ is closed to new replies.