-
Notifications
You must be signed in to change notification settings - Fork 360
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
Remove unnecessary functionality from escapeOrCleanHtml #4320
Remove unnecessary functionality from escapeOrCleanHtml #4320
Conversation
I'm looking through EscapeOrCleanHtmlTest, and also CleanHtmlTest, and not finding this test -- where is it? Trying to make it fail with the behavior you saw before I test the fix. Just running the test classes with PhpUnitFast isn't making them fail. |
@maccabeelevine, it's one of the Mink integration tests that's failing; the unit tests don't catch this. You can see the details if you look at Jenkins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution seems reasonable but I don't understand the original behavior (returning $this) enough to be confident.
module/VuFind/src/VuFind/View/Helper/Root/EscapeOrCleanHtml.php
Outdated
Show resolved
Hide resolved
module/VuFind/src/VuFind/View/Helper/Root/EscapeOrCleanHtml.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems straightforward now!
escapeOrCleanHtml included a mechanism for obtaining the whole object through the
__invoke
method, but this was neither used nor needed and had the potential to cause weird side effects. This PR simplifies the helper by removing the unwanted logic.