• Resolved soheilshadi

    (@soheilshadi)


    I use font awesome in widget title on the sidebars using shortcodes.
    So basically wordpress allows the use of shortcodes on the widget title, and using a plugin like “Font Awesome Shortcodes” I am able to add Font Awesome to the widget menu.

    This is a sample of the widget menu:

    [fa type=book] Book Reviews

    This works in all the widgets I use on the site except this one!
    This is what gets displayed on the site (Just the HTML Code):

    <i class=”fa fa-book”></i> Book Reviews

    And the html source is:
    (without the spaces,of course)

    & lt ; i class=”fa fa-book” & gt ; & lt ; / i & gt ; Book Reviews

    Any solutions?
    Thank you

    https://www.ads-software.com/plugins/book-review-library/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chris Reynolds

    (@jazzs3quence)

    That’s because I’m sanitizing the data to make sure we have a string we expect and not anything that will break the site or people’s computers and I guess no one else does. It’s okay though, because there’s a really simple fix.

    In inc/widgets.php, where there is this line:


    echo $args['before_title'] . esc_html( $title ) . $args['after_title'];

    replace esc_html with wp_kses_post. there should be two places to do that. I will work on getting this added to the codebase for the next update.

    Thread Starter soheilshadi

    (@soheilshadi)

    Perfect,
    Thank you so much ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Widget Title’ is closed to new replies.