Issue Details (XML | Word | Printable)

Key: MDL-7186
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Nicolas Connault
Reporter: Gordon Bateson
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

<IFRAME> should be encoded using HTML entities in lang/pt_br/hotpot.php

Created: 24/Oct/06 11:26 AM   Updated: 11/Apr/07 11:42 PM
Return to search
Issue 481 of 1025 issue(s)
<< Previous | MDL-7186 | Next >>
Component/s: Hotpot
Affects Version/s: 1.6.3
Fix Version/s: 1.8

Environment:
Moodle 1.6
Brazillian portuguese language pack
Issue Links:
Dependency
 

Database: Any
Participants: David Mudrak, Eloy Lafuente (stronk7), Gordon Bateson, Koen Roggemans, Martin Dougiamas and Nicolas Connault
Security Level: None
Resolved date: 30/Mar/07
Affected Branches: MOODLE_16_STABLE
Fixed Branches: MOODLE_18_STABLE


 Description  « Hide
change "navigation_iframe" string in "lang/pt_br/hotpot.php" as follows:

old: <IFRAME> embutido
new: &lt;IFRAME&gt; embutido



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Gordon Bateson added a comment - 24/Oct/06 11:27 AM
this problem was originally reported here:
http://moodle.org/mod/forum/discuss.php?d=56819

Gordon Bateson added a comment - 24/Oct/06 11:37 AM
Assigning this issue to the language Tzar

Koen Roggemans added a comment - 25/Oct/06 05:25 AM
Thanks hotpot guru.
Found a dozen more - fixed them all

Eloy Lafuente (stronk7) added a comment - 25/Oct/06 06:08 AM
Just changing the title a bit to avoid some undesired effect in moodle.org

Eloy Lafuente (stronk7) added a comment - 25/Oct/06 06:46 AM
Canging back the title. Sorry by the noise. Just testing moodle.org :-/

Gordon Bateson added a comment - 25/Oct/06 07:38 AM
Thanks Koen. Closing this issue.

Koen Roggemans added a comment - 26/Mar/07 03:42 AM
The error is not a human error, but caused by saving hotpot.php with the moodle editor. Again there are a few languages affected. I'll recheck them all and fix them.

Koen Roggemans added a comment - 26/Mar/07 03:49 AM
Added David to have a look whether a permanent fix is possible.

Following strings from hotpot.php:
$string['navigation_give_up'] = 'Een enkele "Geef op" knop';
$string['navigation_iframe'] = 'Ingebed <IFRAME>';

get converted to
$string['navigation_give_up'] = 'Een enkele \";Geef op\" knop';
$string['navigation_iframe'] = 'Ingebed <IFRAME>';

if saved with the editor. It messes up the screen in hotpot

Can you have a look or comment on it David? I'll correct the affected language packs. Thanks


Martin Dougiamas added a comment - 26/Mar/07 10:56 AM
Why is there even <IFRAME> in the language strings???

Gordon Bateson added a comment - 26/Mar/07 11:11 AM
Well, strictly speaking there isn't an <IFRAME> in the language strings. We are talking about using HTML-entities such as < and >

The particular language string which started this thread was in hotpot.php:
$string['navigation_iframe'] = 'Embedded <IFRAME>';

This string is used to explain on of the options for the "Navigation" setting of a HotPot activity
http://moodle.org/help.php?module=hotpot&file=navigation.html

I think using the angle brackets helps to make clear that the IFRAME is an HTML element. However, it would be perfectly simple to remove the HTML entities, thus:
$string['navigation_iframe'] = 'Embedded <IFRAME>';

For a more general fix though, I think it would be preferable to handle the HTML-entities in the way that Koen has suggested.


Gordon Bateson added a comment - 26/Mar/07 11:19 AM
Oops, I meant it would be simple to change the string to:
$string['navigation_iframe'] = 'Embedded IFRAME';

Koen Roggemans added a comment - 26/Mar/07 05:55 PM
Since this is the only case where < and > is used in a language pack, and since it is apparently not really necessary to have them, we could aswell just leave them out of the language packs.
I'm happy with removing < and >, rather then tweaking the sanitizing mechanism of the language editor.

Martin Dougiamas added a comment - 27/Mar/07 01:20 PM
Aha, I see now.

Koen if you can remove them then excellent.

But also, David, they should be encoded automatically by the language editor ... can you do that too? (to avoid any such problems in future)


Gordon Bateson added a comment - 27/Mar/07 01:27 PM
Koen,
when you change ">IFRAME<" to plain old "IFRAME" in all the "hotpot.php" language files, please could you also make the same change to all the "help/hotpot/navigation.html" files.

many thanks
Gordon


Nicolas Connault added a comment - 30/Mar/07 01:44 PM
Removed all < and > around IFRAME in all language files.

David Mudrak added a comment - 07/Apr/07 06:49 PM
> But also, David, they should be encoded automatically by the language editor ...
> can you do that too? (to avoid any such problems in future)

Negative. If it encoded all < and > characters, how would the editor work with real <br />, <p>, <strong> and other HTML in strings? Unless we use real template mechamism with i18n feature (like e.g. Zope Page Template) with no HTML in language pack, we can not encode < and > automatically.

The second issue is that the editor apparently does not keep < as < and transforms it back into <. This is bug. I will look at it (I do not have much time these weeks, sorry guys.)


David Mudrak added a comment - 08/Apr/07 01:00 AM

Gordon Bateson added a comment - 11/Apr/07 06:11 PM
Nicolas,

I think MDL-9284 is the same issue. Please could you remove < and > around IFRAME from Moodle 1.6, 1.7 and 1.8 too.

many thanks
Gordon


David Mudrak added a comment - 11/Apr/07 11:42 PM
Gordon,

since language packs do not use CVS branching mechanism, all such fixes are automatically backported into older version. Just download and update your language pack.