Skip to content
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

FIX: prevent shortcodeparser warnings when sitetree link includes anchors or querystrings #8667

Merged
merged 2 commits into from
Jan 29, 2019

Conversation

mikeyc7m
Copy link
Contributor

If a sitetree link contains an anchor or querystring, such as <a href="[sitetree_link,id=1]?my-string=this&thing=2#my-anchor">Link</a> the shortcodeparser chokes. This is a simple fix.

Prevents this death message:

[Warning] SilverStripe\View\Parsers\ShortcodeParser::replaceAttributeTagsWithContent(): unterminated entity reference

@robbieaverill
Copy link
Contributor

What's the chance of getting a unit test for this? 😛

@maxime-rainville
Copy link
Contributor

FYI this was originally raise against SilverStripe 3 at #8649

@robbieaverill robbieaverill self-assigned this Jan 29, 2019
@robbieaverill robbieaverill changed the base branch from 4 to 4.0 January 29, 2019 11:09
Copy link
Contributor

@robbieaverill robbieaverill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a test for this and switched the target to the 4.0 branch. Merge on green - thanks @mikeyc7m !

@robbieaverill robbieaverill removed their assignment Jan 29, 2019
@robbieaverill robbieaverill merged commit da184c9 into silverstripe:4.0 Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants