User tests: Successful: Unsuccessful:
We have error in our HTML markup in the backend, because we use double quotation mark, that is not escaped. You can find this, if you create an menu item of the type single article.
If search for the ID ModalEditArticle_jform_request_id this looks like
<div
id="ModalEditArticle_jform_request_id"
role="dialog" tabindex="-1"
class="joomla-modal modal fade"
data-backdrop="static"
data-keyboard="false"
data-url="index.php?option=com_content&view=article&layout=modal&tmpl=component&d999480f48f1b6c1cb2ca1893c0c4d89=1&task=article.edit&id=' + document.getElementById("jform_request_id_id").value + '"
data-iframe="<iframe class="iframe" src="index.php?option=com_content&amp;view=article&amp;layout=modal&amp;tmpl=component&amp;d999480f48f1b6c1cb2ca1893c0c4d89=1&amp;task=article.edit&amp;id=' + document.getElementById("jform_request_id_id").value + '" name="Edit Article" height="400px" width="800px"></iframe>">
. . .
The attribute data-url is not valid because of the double quotation marks near jform_request_id_id
This PR escapes this characters.
Code review
No
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content |
Title |
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-01 22:36:03 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks :)
That part of the url is really ugly, we shouldn't pass a js command there in the first place. I haven't see all the logic behind this but I'm guessing we could somehow utilise the js Joomla.optionsStorage to pass from the PHP the ID and manipulate the url in a more decent way. Anyhow your PR should be sufficient to remove the error for now but at some point we need to revisit the whole logic here.
Thanks for patching this!