CMS integrations: CMS plugin strips off HTML "form" tags

CMS integrations: CMS plugin strips off HTML "form" tags

by Andrea Bicciolo -
Number of replies: 7
I'm trying to add HTML form tags into the CMS plugin pages (plugin for version 1.5.4+) . The form tags are added copyng/pasting the HTML code into the Moodle HTML editor in code view.

Upon page save, the form tags are omitted as long as the HTML code inside the form tags and no trace of them are found once the page is reopened to edit it. I tried to disable HTML editor, but the problem persitst. Web page resources created with the very same Moodle mantains intact the form tags.

Can't figure where I'm wrong.
Average of ratings: -
In reply to Andrea Bicciolo

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Janne Mikkonen -
Hi Andrea,

Do you have <form> tag listed in weblib's $ALLOWED_TAGS list?

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Andrea Bicciolo -
Hello Janne,
I've just checked the $ALLOWED_TAGS and ther is no <form> tag inside. Thank you for pointing me to this aspect of the CMS plugin.

However, it sound a little strange to me the need to add an allowed tag in the core Moodle libs, thus causing the possible weblib.php overwrite  at each Moodle update . Or I'm missing a setting somewhere in Moodle Admin (1.5.4+)?

The more, why web page resources does not make use of $ALLOWED_TAGS?
In reply to Janne Mikkonen

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Gustav W Delius -
I agree with Andrea here. The CMS plugin should follow the standard Moodle policy here of allowing teachers more freedom about what they want to include in webpages than students.
In reply to Gustav W Delius

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Janne Mikkonen -
Hi Andrea and Gustav,
Well I've always thought the standard policy with $ALLOWED_TAGS is that it should apply to everyone and not just student? Have I mislead my self???

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Andrea Bicciolo -
Janne,
probably Admins and Editing teachers should be allowed to enter some more tags than the set found in $ALLOWED_TAGS. That's the way Moodle Resources works.

Andrea
In reply to Janne Mikkonen

Re: CMS integrations: CMS plugin strips off HTML "form" tags

by Paul Perger -

Hi,

thanx for this cool plugin, it's just what I need! There seems to be an additional problem when I try to use css-classes in my webpages.

For example when I enter and save sth. like

<h1 class="frontblock">Headline</h1>
<p>Then there comes a lot of text!</p>

it's converted into

<h1 class="\"frontblock\"">Headline</h1>
<p>Then there comes a lot of text!</p>

as soon as I reopen the page for editing. As you can imagine, the css-class doesn't work any more after saving again. And it's quite exhausting to manually delete all the additional characters whenever I edit a page. wink

Paul