1

I have a RichText field using a standard config. "Clean up HTML" and "Purify HTML" are OFF.

I have a page with a paragraph of text, then an unordered list. After that list, I try to insert another paragraph and add a line with a mailto link in it.

No matter what, the link gets removed/stripped out. If I move the paragraph up before the UL, it works. But being after the UL list, it's getting stripped out.

Essentially the text in the editor looks like:

<p>text</p>
<ul>
  <li><strong>title</strong> line of text</li>
  <li><strong>title</strong> line of text</li>
</ul>
<p><a href="mailto:myaddress@email.com">Send us a message</a></p>

I did try checking both purify and clean HTML options ON, but that didn't work either. I've tried inserting the text via html view as well as visual view. Still can't get it to stick. I've tried adding multiple paragraphs after the UL list, but HTML is getting stripped out of everything after the list.

Anyone have any ideas?

My standard config json is:

{ buttons: ['html','formatting','bold','italic','unorderedlist','orderedlist','link','image','video'],
plugins: ['fullscreen'],
toolbarFixedBox: true }

Craft Client 2.4.2692

Marc Miller
  • 143
  • 8

1 Answers1

4

The answer here is to disable the mod_security2 rule on the admin folder as I was tripping the SQL Injection prevention rule (#300015) upon saving the Entry form.

This is a server setup that uses cPanel and Apache 2.2.

Edit file:

/usr/local/apache/conf/modsec2/whitelist.conf

Add the following rule:

<LocationMatch "/admin/">
  SecRuleRemoveById 300015
</LocationMatch>
Marc Miller
  • 143
  • 8
  • 1
    This is super helpful! FWIW, I needed to disable both 300015 and 300016. Also, be sure to restart Apache to have the rules applied. – plaintxt Jun 06 '18 at 20:51