User tests: Successful: Unsuccessful:
This commit fixes a bug where special characters like a semicolon get incorrectly removed from the layout parameter, leading to the url using an invalid layout.
Using the ContentHelperRoute
class to construct a category route can sometimes result in generating an invalid url. The layout
parameter has been obtained by JInput::get
which by default will use the cmd
filter, which removes certain special characters from the string.
We should use the string
filter instead here, which allows more characters than cmd
. Note: This does not introduce any security issues as far as I'd assess, because XSS-suspicious strings still get removed by the string
filter, and other stuff should be catched by url-encoding methods such as JRoute::_
. I might have overseen something though, so if somebody could confirm this I'd be very happy.
Create a layout with some special characters in it, e.g. a semicolon. This is e.g. being used YOOthemes Warp Framework to split the used layout and the used style from each other.
Then call this method from somewhere and notice that your semicolon has been removed, leading to an incorrect link.
The link should contain the correct layout paramater.
The link contains a layout parameter with certain special characters removed, leading to an incorrect link as the layout will not be found and the default layout used instead.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-05 20:43:33 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
|
This is already fixed in #20229.