2014-06-30, 07:57 PM
Problem: MyBB removes <style> in posts. I found a fix. The fix is not working.
Question: Help me fix this. Also, did anything change and is <style> handled somewhere else now?
Why this is important: I'm not asking for just one board, but rather for an entire community where there's a dozen people using it at any time, and specifically using this feature, too.
URL: http://rebelwindrpg.com/showthread.php?tid=35
Credentials:
----------------------------------------------
Background & The Fix:
Since MyBB 1.6.10, the style tags in posts were removed. This is because MyBB made the decision to purposefully remove them out of the box.
Since then, someone found a fix for it, which I am reposting here for the purposes of redundancy in case it gets lost: http://www.rpgfix.com/resources/using-st...n-mybb.15/ posted by moosetracks114
In: inc/class_parser.php
Find, around line 117:
What this does is remove blocking <style> blocks in posts.
HOWEVER.
It doesn't seem to be working anymore. See here:
It's still meddling with the <style> tags by replacing parts with the generic < > html codes.
--------------
It seems like something else in MyBB is handling the <style> tags. Did something change, can you point me in the right direction. Anything useful would be helpful, here.
Question: Help me fix this. Also, did anything change and is <style> handled somewhere else now?
Why this is important: I'm not asking for just one board, but rather for an entire community where there's a dozen people using it at any time, and specifically using this feature, too.
URL: http://rebelwindrpg.com/showthread.php?tid=35
Credentials:
username testaccount with a password of 1111111111
Board Version: 1.6.X (getting specifics soon)----------------------------------------------
Background & The Fix:
Since MyBB 1.6.10, the style tags in posts were removed. This is because MyBB made the decision to purposefully remove them out of the box.
Since then, someone found a fix for it, which I am reposting here for the purposes of redundancy in case it gets lost: http://www.rpgfix.com/resources/using-st...n-mybb.15/ posted by moosetracks114
In: inc/class_parser.php
Find, around line 117:
while(preg_match("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", $message))
Replace with:while(preg_match("#<script(.*)>(.*)</script(.*)>#is", $message))
Find, around line 119:$message = preg_replace("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", "<s$1$2>$3</s$4$5>", $message);
Replace with:$message = preg_replace("#<script(.*)>(.*)</script(.*)>#is", "<s$1$2>$3</s$4$5>", $message);
Save and upload
What this does is remove blocking <style> blocks in posts.
HOWEVER.
It doesn't seem to be working anymore. See here:
It's still meddling with the <style> tags by replacing parts with the generic < > html codes.
--------------
It seems like something else in MyBB is handling the <style> tags. Did something change, can you point me in the right direction. Anything useful would be helpful, here.