Custom Mycode URL Problem
#1
Seems that at some point an update to the parser has broken some of my custom MyCode.


\[paste\](?:http|https):\/\/(?:www\.)?pastebin\.com\/([a-zA-Z0-9]{8})\[\/paste\]


Replacement:

<script type="text/javascript" src="//pastebin.com/embed_js/$1"></script>

Unfortunately it seems that it gets parsed as a URL despite it being custom MyCode.  

I seen some Github reports and tried to use the latest class_parser.php to my test site but still no good. I tried also to change parse order.

This worked before. Unsure when it broke.

I thought custom MyCode overwrote any default parsing?

Please advise. This is going to effect a few of my custom MyCodes as well as everyone else with a MyBB forum.
Reply
#2
IIRC, Script replacement for MyCode was removed in a recent version of MyBB ..
Reply
#3
Unsure what you're saying?

This is related to auto_url_mycode().

I can do SCRIPT fine. The replacement works. It's that the URL from the mycode regex doesn't work.

EDIT:

Just an example that's easier to under which doesn't work.

\[paste\](?:http|https):\/\/(?:www\.)?pastebin\.com\/([a-zA-Z0-9]{8})\[\/paste\]

<strong>$1</strong>

EDIT 2:

I went through the github changes. This is last working version in Oct 2017 :
https://raw.githubusercontent.com/lairds...parser.php


This commit broke it:

https://github.com/lairdshaw/mybb/commit...aabb34733c
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)