Title: help with code stripping issues
Last modified: September 12, 2025

---

# help with code stripping issues

 *  Resolved [jhess56](https://wordpress.org/support/users/jhess56/)
 * (@jhess56)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/help-with-code-stripping-issues/)
 * Hello Wordfence Support,
 * I’m investigating an issue where standard WordPress CSS classes, specifically`
   has-text-align-center`, are being stripped when I paste HTML into the Block Editor,
   preventing headings from centering. I have already confirmed this is not a plugin
   or theme conflict.
 * My hosting provider is HostGator on a LiteSpeed server. Can you confirm if any
   of your default firewall rules are known to cause this specific behavior, and
   if there is a recommended setting to create an exception without compromising
   security?
 * Thank you.”

Viewing 1 replies (of 1 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/help-with-code-stripping-issues/#post-18639507)
 * Hi [@jhess56](https://wordpress.org/support/users/jhess56/), thanks for getting
   in touch!
 * Creating a new post using the code editor I’m able to paste `<a href="#" class
   ="has-text-align-center">Here's a link</a>` and save it. Returning to the post
   to edit it in the code editor _and_ inspecting the code of the published post
   itself keeps the `class` in tact. However, when I paste it into the visual editor
   it is stripped immediately and isn’t saved, which I believe to be the intended
   behavior.
 * There were no entries in Wordfence’s [Live Traffic](https://www.wordfence.com/help/tools/live-traffic/)
   after this happened, which would show whether a rule was blocking it. This also
   occurs in exactly the same way with Wordfence deactivated.
 * Many thanks,
   Peter.

Viewing 1 replies (of 1 total)

The topic ‘help with code stripping issues’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [8 months, 1 week ago](https://wordpress.org/support/topic/help-with-code-stripping-issues/#post-18639507)
 * Status: resolved