cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

Add a new Content Tag: {title_attr} #244

Closed cabrerahector closed 4 years ago

cabrerahector commented 4 years ago

Is your feature request related to a problem? Please describe.

Currently the plugin provides two title related Content Tags:

Problem is that if the user uses the latter inside a title attribute or an alt attribute, if the title contains single/double quotes it might break the HTML markup of the tag and could cause some issues on the page itself.

Describe the solution you'd like

A new {title_attr} Content Tag that would behave just like {text_title}, except it's sanitized for usage inside tag attributes.