Skip to content

Image Style Percentage #151

@egknight

Description

@egknight

Why are image style height percentage stripped but not for pixels?

Input

<img class="img-fluid" src="/storage/uploads/abc.jpeg" alt="abc.jpeg" style="width: 25%;">

Output

<img class="img-fluid" src="/storage/uploads/abc.jpeg" alt="abc.jpeg">

I've configured my settings as follows, including style within img[]

'HTML.Allowed'             => 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src|class|style]',

If I pass the height and width as pixels, it works as expected.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions