? Pending

User tests: Successful: Unsuccessful:

avatar 810
810
25 Aug 2017

Corrects #17706

Test instructions

Dowload last staging.
Modify the en-GB.ini as this PR does.
Install using en-GB and click on Remove "Installaion" Folder

Steps to reproduce the issue

Install, and press Remove "installation" folder

Expected result

"installation" folder removed.

Actual result

"installation" folder removed.

After Patch

"installation" folder removed.

System information (as much as possible)

install with en-gb language

Additional comments

avatar joomla-cms-bot joomla-cms-bot - change - 25 Aug 2017
Category Installation Language & Strings
avatar 810 810 - open - 25 Aug 2017
avatar 810 810 - change - 25 Aug 2017
Status New Pending
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Aug 2017

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.

avatar infograf768 infograf768 - change - 25 Aug 2017
The description was changed
avatar infograf768 infograf768 - edited - 25 Aug 2017
avatar infograf768 infograf768 - test_item - 25 Aug 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 25 Aug 2017

I have tested this item successfully on 15ccbad


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17718.

avatar infograf768 infograf768 - change - 25 Aug 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 25 Aug 2017

RTC. Can be merged on review.

@mbabker


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17718.

avatar brianteeman
brianteeman - comment - 26 Aug 2017

Wile this PR works isnt the real problem to resolve the why html entities are not being rendered here

avatar mbabker
mbabker - comment - 26 Aug 2017

It's an AJAX driven task so something with the JavaScript handling it I would presume.

avatar infograf768
infograf768 - comment - 27 Aug 2017

@mbabker
Counting @brianteeman as testing OK, can this be merged?

It would avoid TTs already working on these ini files to make an error.

avatar ggppdk
ggppdk - comment - 27 Aug 2017

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> &quot;Text&quot; </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> &quot;Text&quot; </b> and some more \"text\" ";

			// The assigned string will be encoded because .value is text property
			document.getElementById('input-test').value = "<b> &quot;Text&quot; </b> and some more \"text\" ";

			// The assigned string will not be encoded because .innerHTML can be assigned HTML
			document.getElementById('div-test').innerHTML = "<b> &quot;Text&quot; </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>
avatar ggppdk
ggppdk - comment - 27 Aug 2017

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

  • after click hide the button and display a div with a loading animation
  • and on response received set the response's HTML as innerHTML of the above div
avatar mbabker mbabker - change - 27 Aug 2017
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: ?
avatar mbabker mbabker - close - 27 Aug 2017
avatar mbabker mbabker - merge - 27 Aug 2017
avatar infograf768
infograf768 - comment - 27 Aug 2017

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 &quot;. This will normalise the work for TTs, once they are explained this.
com_localise, already since a few versions, is already doing this systematically.

avatar mbabker
mbabker - comment - 27 Aug 2017

Using &quot; 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.

avatar infograf768
infograf768 - comment - 27 Aug 2017

That is exactly what I meant. It will work in any context.

Add a Comment

Login with GitHub to post a comment