-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BBCode shortcode parameter value chokes on the tag closing character #65
Comments
@MrPetovan Your reasoning here and in #38 is correct, the |
For backward compatibility in my project, I need to be able to parse such shortcode. I see two ways of solving it:
Just throwing ideas around. |
@MrPetovan please look at #66. Please install the Flyers won their match, I had fun writing code, and it's nearly dawn at my place, so I'm going to a well-deserved sleep. :) |
I use a little workaround for public function getBbCode($sc)
{
$code = null;
if ($this->getParser() === 'wordpress') {
$params = $sc->getParameters();
if (is_array($params)) {
$keys = array_keys($params);
$code = trim(array_shift($keys), '=');
}
} else {
$code = $sc->getBbCode();
}
return $code;
} |
Using
CommonSyntax
, the following text won't be picked up by the regular parser:[url=http://example.com]link[/url]
The parser correctly recognize the opening shortcode, continue to getting the parameter value, then finds a
/
which is a marker token, then look for a closing token, doesn't find it and return false.Using parameter delimiter like this
[url="http://example.com"]link[/url]
yields the expected result.The text was updated successfully, but these errors were encountered: