User tests: Successful: Unsuccessful:
Corrects #17706
Dowload last staging.
Modify the en-GB.ini as this PR does.
Install using en-GB and click on Remove "Installaion" Folder
Install, and press Remove "installation" folder
"installation" folder removed.
"installation" folder removed.
"installation" folder removed.
install with en-gb language
Category | ⇒ | Installation Language & Strings |
Status | New | ⇒ | Pending |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC. Can be merged on review.
Wile this PR works isnt the real problem to resolve the why html entities are not being rendered here
It's an AJAX driven task so something with the JavaScript handling it I would presume.
@mbabker
Counting @brianteeman as testing OK, can this be merged?
It would avoid TTs already working on these ini files to make an error.
Explanation
The value of the button can only be assigned text and not HTML
and current language string value is HTML and not text !
"installation"
and by doing
$el.val(r.data.text);
javascript will correctly encode the given value before assigning into the value
to make it more clear
imagine that your language string had not only HTML character entities but also HTML tags,
would you expect that an input-type-button would interpret and show the following HTML ?
<b> "Text" </b> and some more \"text\"
try the below small HTML example to see what is happening
<html>
<script>
document.addEventListener("DOMContentLoaded", function() {
var some_html = "<b> "Text" </b> and some more \"text\" ";
// The assigned string will be encoded because .value is text property
document.getElementById('input-test').value = "<b> "Text" </b> and some more \"text\" ";
// The assigned string will not be encoded because .innerHTML can be assigned HTML
document.getElementById('div-test').innerHTML = "<b> "Text" </b> and some more \"text\" ";
});
</script>
<body>
<input id="input-test" type="button" value="This is a text value, i can not display HTML tags or interpret HTML entities , etc">
<div id="div-test">HTML can be placed here</div>
</body>
</html>
In short to continue my above answer it was not good idea to assign response to the value of the input-typebutton
Correct fix , now and for future
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-27 16:09:07 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
In any case, as we will not have any "_QQ_"
in 4.0, I think it is best to always use escaped double quotes everywhere we need double quotes now and get rid of "
. This will normalise the work for TTs, once they are explained this.
com_localise, already since a few versions, is already doing this systematically.
Using "
is fine if you can guarantee the string will always be displayed in an HTML context. Using escaped quotes is better since you don't have to worry about the display context.
That is exactly what I meant. It will work in any context.
Please add more information to your issue. Without test instructions and/or any description we will close this issue within 4 weeks. Thanks.
This is an automated message from the J!Tracker Application.