Post Reply 
Fixing the Code Tags
Jul. 18, 2010, 11:32 AM
Post: #1
Fixing the Code Tags
Can the forum [code] tags be adjusted to not render entities like • or   ?

An example snippet is attached.


Attached File(s)
.txt  code-snippet.txt (Size: 170 bytes / Downloads: 758)
Add Thank You Quote this message in a reply
Jul. 18, 2010, 10:12 PM (This post was last modified: Jul. 18, 2010 10:17 PM by JJoe.)
Post: #2
RE: Fixing the Code Tags
I found the why, http://community.mybb.com/thread-788-pos...ml#pid5359

Chris Boulton Wrote:The reason behind this is so we can support unicode messages on the forum..

and http://community.mybb.com/thread-51095-p...#pid358919 Wink

Ryan Gordon Wrote:number entities are parsed by the MyBB parser -   and others aren't parsed

I think he means decimal code,

Code:
.

So for a work around we should be able to use html entities or hex.

Code:
• and •

Same page may have a fix.

Hmmm. The work around might be a better choice. Your filters do get posted on other forums.
Add Thank You Quote this message in a reply
Jul. 19, 2010, 10:10 AM
Post: #3
RE: Fixing the Code Tags
(Jul. 18, 2010 10:12 PM)JJoe Wrote:  and http://community.mybb.com/thread-51095-p...#pid358919 Wink

It seems that patch should could fix the issue. Maybe Kye-U forgot to apply it after upgraded to newer version?
Add Thank You Quote this message in a reply
Jul. 19, 2010, 04:13 PM (This post was last modified: Jul. 19, 2010 04:14 PM by sidki3003.)
Post: #4
RE: Fixing the Code Tags
Hopefully Smile!


(Jul. 18, 2010 10:12 PM)JJoe Wrote:  So for a work around we should be able to use html entities or hex.

Code:
• and •

Same page may have a fix.

Hmmm. The work around might be a better choice. Your filters do get posted on other forums.

Modifying the filters to work around a MyBB bug appears a little... uhm... off the road to me. Wink
(IIRC other forum software packages had differing bugs.)

Besides, the filters' entity notation isn't arbitrary. For instance, named entities break XHTML.
Add Thank You Quote this message in a reply
Jul. 20, 2010, 03:27 PM (This post was last modified: Jul. 20, 2010 03:39 PM by Kye-U.)
Post: #5
RE: Fixing the Code Tags
(Jul. 19, 2010 10:10 AM)whenever Wrote:  
(Jul. 18, 2010 10:12 PM)JJoe Wrote:  and http://community.mybb.com/thread-51095-p...#pid358919 Wink

It seems that patch should could fix the issue. Maybe Kye-U forgot to apply it after upgraded to newer version?

Hello!

You are correct, I applied the RSS/ATOM patch but forgot about the Code tag issue. I'll add it and test it using the snippet Sidki provided.

EDIT: Applied. Test:

Code:
Replace = "\9<span class=\0Pr0x&#x20;Pr0xCntS\0 style=\0display:$GET(displayD)\0>"
          "&#8226;&#160;SiteSpec-\1\2: \3 \4</span>$GET(sAdKeyR)\5"

Sorry for the inconvenience everyone! I will make note to do the manual patch next time there's a forum update.
Visit this user's website
Add Thank You Quote this message in a reply
Oct. 26, 2010, 02:52 PM
Post: #6
RE: Fixing the Code Tags
http://prxbx.com/forums/showthread.php?tid=143 is not readable now. I think it is related to the code tag patch.
Add Thank You Quote this message in a reply
Dec. 23, 2010, 08:38 AM
Post: #7
RE: Fixing the Code Tags
Seems like all of the older posts (made in 2004) are impacted (since they were imported and salvaged from the various forum software we used before (such as Invision)). As of right now I'm not sure what I can do, maybe I'll have to export all impacted posts, process them (convert the unicode values), and then re-import them back. Thanks for the post!
Visit this user's website
Add Thank You Quote this message in a reply
Dec. 24, 2010, 02:14 AM
Post: #8
RE: Fixing the Code Tags
(Dec. 23, 2010 08:38 AM)Kye-U Wrote:  Seems like all of the older posts (made in 2004) are impacted (since they were imported and salvaged from the various forum software we used before (such as Invision)).

I had a copy of that page, which was saved in year 2008 and it looks normally.

The forum software at that time was the same as what is used now, I think.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: