• Resolved Ari123

    (@ucdguy)


    Hi,

    Thank you for a great plugin!

    Is it possible to insert an inline SVG into a question? I would like to use a custom font for the text in my SVGs, but I believe this font file can be used by an SVG only if the SVG is inline rather than in img tags.

    When I put the below basic SVG into the “text” mode of the editor and click save, most of it has disappeared when I look back at the editor.

    <svg xmlns=”https://www.w3.org/2000/svg&#8221; viewBox=”0 0 277.39 52.32″><defs><style>.a{fill:#fff;stroke:#1d1d1b;stroke-miterlimit:10;}.b{font-size:12px;fill:#1d1d1b;font-family:MyriadPro-Regular, Myriad Pro;}</style></defs><line class=”a” y1=”0.5″ x2=”277.39″ y2=”0.5″/><text class=”b” transform=”translate(125.65 49.32)”>Hello</text></svg>

    Is there a way to insert an inline SVG into a question?

    Thanks!

    • This topic was modified 2 years, 11 months ago by Ari123.
    • This topic was modified 2 years, 11 months ago by Ari123.
    • This topic was modified 2 years, 11 months ago by Ari123.
Viewing 1 replies (of 1 total)
  • Plugin Author Ays Pro

    (@ays-pro)

    Dear @ucdguy,

    Thank you for the topic.

    I want to mention that we sanitize the Question title via the wp_kses_post function.
    Please note, that the SVG is not being supported by WordPress, that is why this tag is being removed while sanitizing.

    The tag is being removed while sanitizing that is why the SVG is being removed as well.
    Unfortunately, we are not able to make any changes in this regard and exclude the process of sanitizing, since it is a required condition of WordPress.

    For now, we can suggest you change the SVG and, in case it is an image, achieve your desired result with the help of an image tag.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Inline SVG’ is closed to new replies.