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
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

Gordon Bateson made changes - 24/Oct/06 11:37 AM
Field Original Value New Value
Assignee Gordon Bateson [ xxxxxxx ] Koen Roggemans [ koen ]
koenr committed 5 files to 'Lang CVS' - 25/Oct/06 04:44 AM
MDL-7186
MODIFY ca_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
MODIFY eu_utf8/hotpot.php   Rev. 1.5    (+1 -1 lines)
MODIFY nl_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
MODIFY pt_br_utf8/hotpot.php   Rev. 1.4    (+1 -1 lines)
MODIFY es_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
koenr committed 1 file to 'Lang CVS' - 25/Oct/06 04:53 AM
MDL-7186
MODIFY fi_utf8/hotpot.php   Rev. 1.6    (+1 -1 lines)
koenr committed 13 files to 'Lang CVS' - 25/Oct/06 04:58 AM
MDL-7186
MODIFY sv_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
MODIFY tr_utf8/hotpot.php   Rev. 1.10    (+1 -1 lines)
MODIFY zh_cn_utf8/hotpot.php   Rev. 1.4    (+1 -1 lines)
MODIFY hu_utf8/hotpot.php   Rev. 1.5    (+1 -1 lines)
MODIFY ta_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
MODIFY is_utf8/hotpot.php   Rev. 1.4    (+2 -2 lines)
MODIFY no_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
MODIFY sr_cr_utf8/hotpot.php   Rev. 1.13    (+2 -2 lines)
MODIFY tl_utf8/hotpot.php   Rev. 1.5    (+1 -1 lines)
MODIFY pl_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
MODIFY sk_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
MODIFY sr_lt_utf8/hotpot.php   Rev. 1.12    (+2 -2 lines)
MODIFY th_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
Koen Roggemans added a comment - 25/Oct/06 05:25 AM
Thanks hotpot guru.
Found a dozen more - fixed them all

Koen Roggemans made changes - 25/Oct/06 05:25 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Fix Version/s 1.7 [ 10120 ]
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) made changes - 25/Oct/06 06:08 AM
Summary <IFRAME> should be encoded using HTML entities in lang/pt_br/hotpot.php IFRAME should be encoded using HTML entities in lang/pt_br/hotpot.php
Eloy Lafuente (stronk7) added a comment - 25/Oct/06 06:46 AM
Canging back the title. Sorry by the noise. Just testing moodle.org :-/

Eloy Lafuente (stronk7) made changes - 25/Oct/06 06:46 AM
Summary IFRAME should be encoded using HTML entities in lang/pt_br/hotpot.php <IFRAME> should be encoded using HTML entities in lang/pt_br/hotpot.php
Gordon Bateson added a comment - 25/Oct/06 07:38 AM
Thanks Koen. Closing this issue.

Gordon Bateson made changes - 25/Oct/06 07:38 AM
Status Resolved [ 5 ] Closed [ 6 ]
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 made changes - 26/Mar/07 03:42 AM
Fix Version/s 1.8 [ 10130 ]
Resolution Fixed [ 1 ]
Fix Version/s 1.7 [ 10120 ]
Status Closed [ 6 ] Reopened [ 4 ]
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


koenr committed 1 file to 'Lang CVS' - 26/Mar/07 03:52 AM
MDL-7186
MODIFY cs_utf8/hotpot.php   Rev. 1.7    (+2 -2 lines)
koenr committed 2 files to 'Lang CVS' - 26/Mar/07 04:00 AM
MDL-7186
MODIFY pt_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
MODIFY mi_wwow_utf8/hotpot.php   Rev. 1.2    (+2 -2 lines)
koenr committed 1 file to 'Lang CVS' - 26/Mar/07 04:10 AM
MDL-7186 and removing untranslated strings
MODIFY ta_utf8/hotpot.php   Rev. 1.4    (+1 -116 lines)
koenr committed 2 files to 'Lang CVS' - 26/Mar/07 04:11 AM
MDL-7186
MODIFY zh_cn_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
MODIFY tl_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
Martin Dougiamas added a comment - 26/Mar/07 10:56 AM
Why is there even <IFRAME> in the language strings???

Martin Dougiamas made changes - 26/Mar/07 10:56 AM
Priority Major [ 3 ] Minor [ 4 ]
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 made changes - 27/Mar/07 01:18 PM
Assignee Koen Roggemans [ koen ] David Mudrak [ mudrd8mz ]
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 made changes - 29/Mar/07 04:50 PM
Assignee David Mudrak [ mudrd8mz ] Nicolas Connault [ nicolasconnault ]
Nicolas Connault committed 2 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 30/Mar/07 01:21 PM
MDL-7186: Removed offending angle brackets, 3 counts in 2 files.
MODIFY lang/en_utf8/hotpot.php   Rev. 1.9.4.1    (+2 -2 lines)
MODIFY lang/en_utf8/help/hotpot/navigation.html   Rev. 1.3.2.1    (+2 -2 lines)
Nicolas Connault committed 2 files to 'Moodle CVS' - 30/Mar/07 01:21 PM
Nicolas Connault committed 34 files to 'Lang CVS' - 30/Mar/07 01:44 PM
MDL-7186 Removed all < and > around IFRAME
MODIFY is_utf8/hotpot.php   Rev. 1.5    (+2 -2 lines)
MODIFY sr_lt_utf8/hotpot.php   Rev. 1.13    (+2 -2 lines)
MODIFY el_utf8/help/hotpot/navigation.html   Rev. 1.2    (+2 -2 lines)
MODIFY sr_cr_utf8/hotpot.php   Rev. 1.14    (+2 -2 lines)
MODIFY hu_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
MODIFY zh_cn_utf8/hotpot.php   Rev. 1.8    (+1 -1 lines)
MODIFY fr_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
MODIFY pt_br_utf8/hotpot.php   Rev. 1.6    (+1 -1 lines)
MODIFY sk_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
MODIFY ca_utf8/hotpot.php   Rev. 1.3    (+2 -2 lines)
MODIFY it_utf8/help/hotpot/navigation.html   Rev. 1.2    (+3 -3 lines)
MODIFY ko_utf8/help/hotpot/navigation.html   Rev. 1.3    (+3 -3 lines)
MODIFY fi_utf8/hotpot.php   Rev. 1.7    (+1 -1 lines)
MODIFY ja_utf8/help/hotpot/navigation.html   Rev. 1.4    (+3 -3 lines)
MODIFY pt_utf8/hotpot.php   Rev. 1.4    (+1 -1 lines)
MODIFY fr_utf8/help/hotpot/navigation.html   Rev. 1.3    (+2 -2 lines)
MODIFY cs_utf8/help/hotpot/navigation.html   Rev. 1.3    (+2 -2 lines)
MODIFY no_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
MODIFY sv_utf8/hotpot.php   Rev. 1.4    (+1 -1 lines)
MODIFY sv_utf8/help/hotpot/navigation.html   Rev. 1.4    (+3 -3 lines)
MODIFY eu_utf8/hotpot.php   Rev. 1.11    (+1 -1 lines)
MODIFY tr_utf8/hotpot.php   Rev. 1.11    (+1 -1 lines)
MODIFY pt_br_utf8/help/hotpot/navigation.html   Rev. 1.4    (+3 -3 lines)
MODIFY tl_utf8/help/hotpot/navigation.html   Rev. 1.3    (+2 -2 lines)
MODIFY pl_utf8/hotpot.php   Rev. 1.3    (+1 -1 lines)
MODIFY sl_utf8/hotpot.php   Rev. 1.3    (+2 -2 lines)
MODIFY tl_utf8/hotpot.php   Rev. 1.8    (+1 -1 lines)
MODIFY th_utf8/hotpot.php   Rev. 1.5    (+1 -1 lines)
MODIFY es_utf8/help/hotpot/navigation.html   Rev. 1.3    (+2 -2 lines)
MODIFY cs_utf8/hotpot.php   Rev. 1.8    (+1 -1 lines)
MODIFY ja_utf8/hotpot.php   Rev. 1.25    (+1 -1 lines)
MODIFY sv_utf8/help/hotpotatoes/navigation.html   Rev. 1.2    (+2 -2 lines)
MODIFY zh_cn_utf8/help/hotpot/navigation.html   Rev. 1.2    (+3 -3 lines)
MODIFY nl_utf8/hotpot.php   Rev. 1.10    (+1 -1 lines)
Nicolas Connault added a comment - 30/Mar/07 01:44 PM
Removed all < and > around IFRAME in all language files.

Nicolas Connault made changes - 30/Mar/07 01:44 PM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
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

David Mudrak made changes - 08/Apr/07 01:01 AM
Link This issue will help resolve MDL-9248 [ MDL-9248 ]
David Mudrak made changes - 08/Apr/07 01:02 AM
Link This issue will be resolved by MDL-9248 [ MDL-9248 ]
David Mudrak made changes - 08/Apr/07 01:02 AM
Link This issue will be resolved by MDL-9248 [ MDL-9248 ]
David Mudrak made changes - 08/Apr/07 01:03 AM
Link This issue will help resolve MDL-9248 [ MDL-9248 ]
David Mudrak made changes - 08/Apr/07 01:03 AM
Link This issue will be resolved by MDL-9248 [ MDL-9248 ]
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.