How to prevent removing tags?

How to prevent removing tags?

by Martin Mueller -
Number of replies: 3

Hi

I prepared a hughe image map in HTML Editor. When toggling source mode and edit mode, the only thing which happens is that the realtive paths are converted to absolute ones (including the http://www.xyz.tv... wischi waschi muppet). (Btw: Can one disable this autmatic behaviour anywhere?)

Now, the big problem is that when saving (Im creating a lesson with Moodle 1.5.2+), the whole <map...> </map> section disapears.

What must one do to preserve those tags? Or is it really not possible to create image maps?

TIA - Martin

Average of ratings: -
In reply to Martin Mueller

Re: How to prevent removing tags?

by Martin Mueller -

Ok, found it myself. If I add <map> and <area> to $ALLOWED_TAGS found in lib/weblib.php, it runs.

However, since those tags are not member of the Moodle distribution, I'm asking me, if there are known (security?) issues? If not, what steps do I have to accomplish in order to let this change become part of Moodle?

TIA - Martin

In reply to Martin Mueller

Re: How to prevent removing tags?

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
There is a bug in lesson module, it should not clean the data - because it always comes from teacher. It would be better to fix the module, unfortunatelly I do not have enough time just now to fix it myself sad The code is quite complex, it would take several days to fix&test it...

skodak
In reply to Martin Mueller

Re: How to prevent removing tags?

by Martin Mueller -

Stumbling in again...

If I add a

<map name="map1">
  <area shape = "rect" coords = "85,482,100,496" href = "#fa" />
</map>

section to a WebPage in html mode as the admin and toggle to edit mode and back, the result is:

<map name="map1">
  <area href = "#fa" />
</map>

I have Moodle 1.5.2+ version 2005060220.

I added this as bug 3809