Non-core contributed modules

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.11
  • Fix Version/s: None
  • Component/s: Module: HotPot
  • Labels:
    None
  • Environment:
    Moodle 1.6
    Brazillian portuguese language pack
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE

Description

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

old: <IFRAME> embutido
new: <IFRAME> embutido

Issue Links

Activity

Hide
Gordon Bateson added a comment -

this problem was originally reported here:
http://moodle.org/mod/forum/discuss.php?d=56819

Show
Gordon Bateson added a comment - this problem was originally reported here: http://moodle.org/mod/forum/discuss.php?d=56819
Hide
Gordon Bateson added a comment -

Assigning this issue to the language Tzar

Show
Gordon Bateson added a comment - Assigning this issue to the language Tzar
Hide
Koen Roggemans added a comment -

Thanks hotpot guru.
Found a dozen more - fixed them all

Show
Koen Roggemans added a comment - Thanks hotpot guru. Found a dozen more - fixed them all
Hide
Eloy Lafuente (stronk7) added a comment -

Just changing the title a bit to avoid some undesired effect in moodle.org

Show
Eloy Lafuente (stronk7) added a comment - Just changing the title a bit to avoid some undesired effect in moodle.org
Hide
Eloy Lafuente (stronk7) added a comment -

Canging back the title. Sorry by the noise. Just testing moodle.org :-/

Show
Eloy Lafuente (stronk7) added a comment - Canging back the title. Sorry by the noise. Just testing moodle.org :-/
Hide
Gordon Bateson added a comment -

Thanks Koen. Closing this issue.

Show
Gordon Bateson added a comment - Thanks Koen. Closing this issue.
Hide
Koen Roggemans added a comment -

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.

Show
Koen Roggemans added a comment - 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.
Hide
Koen Roggemans added a comment -

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

Show
Koen Roggemans added a comment - 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
Hide
Martin Dougiamas added a comment -

Why is there even <IFRAME> in the language strings???

Show
Martin Dougiamas added a comment - Why is there even <IFRAME> in the language strings???
Hide
Gordon Bateson added a comment -

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.

Show
Gordon Bateson added a comment - 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.
Hide
Gordon Bateson added a comment -

Oops, I meant it would be simple to change the string to:
$string['navigation_iframe'] = 'Embedded IFRAME';

Show
Gordon Bateson added a comment - Oops, I meant it would be simple to change the string to: $string['navigation_iframe'] = 'Embedded IFRAME';
Hide
Koen Roggemans added a comment -

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.

Show
Koen Roggemans added a comment - 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.
Hide
Martin Dougiamas added a comment -

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)

Show
Martin Dougiamas added a comment - 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)
Hide
Gordon Bateson added a comment -

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

Show
Gordon Bateson added a comment - 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
Hide
Nicolas Connault added a comment -

Removed all < and > around IFRAME in all language files.

Show
Nicolas Connault added a comment - Removed all < and > around IFRAME in all language files.
Hide
David Mudrak added a comment -

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

Show
David Mudrak added a comment - > 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.)
Hide
David Mudrak added a comment -
Show
David Mudrak added a comment - See MDL-9248
Hide
Gordon Bateson added a comment -

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

Show
Gordon Bateson added a comment - 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
Hide
David Mudrak added a comment -

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.

Show
David Mudrak added a comment - 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.
Hide
Kyriakos Terzopoulos added a comment -

This issue still exists for the Greek language pack.
Can anyone fix it?

Show
Kyriakos Terzopoulos added a comment - This issue still exists for the Greek language pack. Can anyone fix it?
Hide
David Mudrak added a comment -

It should be fixed by the maintainer of the Greek lang pack. Can you contact him/her?

Show
David Mudrak added a comment - It should be fixed by the maintainer of the Greek lang pack. Can you contact him/her?

Dates

  • Created:
    Updated:
    Resolved: