<p>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.</p>

<p>This is a server setup that uses cPanel and Apache 2.2. </p>

<p>Edit file:</p>

<pre><code>/usr/local/apache/conf/modsec2/whitelist.conf
</code></pre>

<p>Add the following rule:</p>

<pre><code>&lt;LocationMatch "/admin/"&gt;
  SecRuleRemoveById 300015
&lt;/LocationMatch&gt;
</code></pre>

CC BY-SA 4.0
2018-06-06T20:51:14.730Z
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
CC BY-SA 3.0
2015-09-18T16:51:33.640Z
2015-09-18T16:51:33.640Z
Marc Miller
<p>I have a RichText field using a standard config. "Clean up HTML" and "Purify HTML" are OFF.</p>

<p>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.</p>

<p>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.</p>

<p>Essentially the text in the editor looks like:</p>

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

<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.</p>

<p>Anyone have any ideas?</p>

<p>My standard config json is:</p>

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

<p>Craft Client 2.4.2692</p>

CC BY-SA 3.0
2015-09-17T19:39:24.900Z
Is it getting stripped on save, or when you toggle between Source/HTML view?
Brad Bell
CC BY-SA 3.0
2015-09-17T22:28:46.870Z
Stripped on save. I'm starting to wonder if mod_security2 might be in play? This is reminiscent of problems I've had with Wordpress and mod_sec.
Marc Miller
CC BY-SA 3.0
2015-09-17T23:07:04.040Z
I wouldn't be surprised.  Maybe temporarily disable it to test?
Brad Bell
<richtext>
Richtext field removing inserted links
# Richtext field removing inserted links

(Asked by: username_0 on 2015-09-17)

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:
text

  title line of text
  title line of text

Send us a message

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

**Tags:** richtext
> **Comments:**
> **username_1**: Is it getting stripped on save, or when you toggle between Source/HTML view?  
> **username_0**: Stripped on save. I'm starting to wonder if mod_security2 might be in play? This is reminiscent of problems I've had with Wordpress and mod_sec.  
> **username_1**: I wouldn't be surprised.  Maybe temporarily disable it to test?  

---

## 1 answers

### Answer by username_0 on 2015-09-18. Score: 4 | Accepted answer

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:

  SecRuleRemoveById 300015

> **Comments:**
> **username_2**: This is super helpful! FWIW, I needed to disable both 300015 and 300016. Also, be sure to restart Apache to have the rules applied.  

---

