diff --git a/modules/apps/portal-security/portal-security-antisamy/build.gradle b/modules/apps/portal-security/portal-security-antisamy/build.gradle
index d26048f692a8516f92865a8b781eff95e3950b75..b200a30e3992d89fa2be54a3f4cdbc03033f9ba4 100644
--- a/modules/apps/portal-security/portal-security-antisamy/build.gradle
+++ b/modules/apps/portal-security/portal-security-antisamy/build.gradle
@@ -1,7 +1,9 @@
 import com.liferay.gradle.util.FileUtil
 
+task processBlogsSanitizerConfiguration(type: Copy)
 task processSanitizerConfiguration(type: Copy)
 
+File sanitizerConfigurationFile = new File("src/main/resources/META-INF/resources/sanitizer-configuration.xml")
 String sanitizerConfigurationUrl = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/owaspantisamy/antisamy-ebay-1.4.4.xml"
 
 dependencies {
@@ -27,13 +29,40 @@ dependencies {
 	compileOnly project(":core:petra:petra-string")
 }
 
+processBlogsSanitizerConfiguration {
+	dependsOn processSanitizerConfiguration
+
+	File blogsSanitizerConfigurationFile = new File("src/main/resources/META-INF/resources/blogs-sanitizer-configuration.xml")
+
+	ext {
+		autoClean = false
+	}
+
+	filter {
+		return _filterBlogsSanitizer(it)
+	}
+
+	from {
+		sanitizerConfigurationFile
+	}
+
+	into blogsSanitizerConfigurationFile.parentFile
+
+	onlyIf {
+		!blogsSanitizerConfigurationFile.exists()
+	}
+
+	rename {
+		blogsSanitizerConfigurationFile.name
+	}
+}
+
 processResources {
+	dependsOn processBlogsSanitizerConfiguration
 	dependsOn processSanitizerConfiguration
 }
 
 processSanitizerConfiguration {
-	File sanitizerConfigurationFile = new File("src/main/resources/META-INF/resources/sanitizer-configuration.xml")
-
 	ext {
 		autoClean = false
 	}
@@ -147,4 +176,89 @@ processSanitizerConfiguration {
 	rename {
 		sanitizerConfigurationFile.name
 	}
+}
+
+private String _filterBlogsSanitizer(String line) {
+	if (line.contains('<directive name="embedStyleSheets" value="false"/>')) {
+		line = """\
+			|	${line}
+			|	<directive name="allowDynamicAttributes" value="true"/>""".stripMargin()
+	}
+
+	if (line.contains('</global-tag-attributes>')) {
+		line = """\
+			|	${line}
+			|	<dynamic-tag-attributes>
+			|		<attribute name="data-"/>
+			|	</dynamic-tag-attributes>""".stripMargin()
+	}
+
+	if (line.contains('<common-attributes>')) {
+		line = """\
+			|	${line}
+			|		<attribute name="data-" description="Allows the HTML5 'data-' attribute to be added to elements">
+			|			<regexp-list>
+			|				<regexp name="anything"/>
+			|			</regexp-list>
+			|		</attribute>""".stripMargin()
+	}
+
+	if (line.contains('<literal value="hr"/>')) {
+		line = """\
+			|	${line}
+			|	<literal value="iframe"/>""".stripMargin()
+	}
+	else if (line.contains('<tag name="iframe" action="remove"/>')) {
+		line = """\
+		|	<tag name="iframe" action="validate">
+		|		<attribute name="allow">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="allowfullscreen">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="allowTransparency">
+		|			<regexp-list>
+		|				<regexp name="boolean"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="frameborder">
+		|			<regexp-list>
+		|				<regexp name="integer"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="height"/>
+		|		<attribute name="mozallowfullscreen">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="scrolling">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="src">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="style">
+		|			<regexp-list>
+		|				<regexp name="anything"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="webkitallowfullscreen">
+		|			<regexp-list>
+		|				<regexp name="boolean"/>
+		|			</regexp-list>
+		|		</attribute>
+		|		<attribute name="width"/>
+		|	</tag>""".stripMargin()
+	}
+	return line
 }
\ No newline at end of file