Plugin Directory

Safe Paste

Removes a lot of HTML tags from post and page content before inserting it to database. Preventing users to paste undesired HTML tags to content.


  • Checks for 'unfiltered_html' WP core capability to exclude certain users/roles from the cleanup.
  • Added filter safepaste_post_types to set the post types where the cleanup will take place, by default is applied to post and pages.
  • Added filter safepaste_allowed_tags to allow customization of the allowed tags.
  • Added filter safepaste_allowed_protocols to allow customization of the allowed protocols.
  • Added code tag to allowed HTML tags.



  • Changed: Allow 'width' and 'height' for img tag. This allow to resize images in the WP editor.


  • Changed: Now using WP function wp_kses instead of generic PHP strip_tags. This change also allow to use cforms plugin, that uses HTML comments to insert their forms (a very bad method by the way, should use shortcodes instead).
  • Added: Allow only http and https protocols in post/page content.


  • Initial release.

Requires: 3.0 or higher
Compatible up to: 4.4.5
Last Updated: 8 months ago
Active Installs: 100+


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,1,1