Help! Valid HTML (attached) mangled by editor

Help! Valid HTML (attached) mangled by editor

door Ian Usher -
Aantal antwoorden: 9

Hello!

I have (valid) HTML from Dreamweaver which includes a form with various fields - the forms calls a standard forms processor outside of Moodle to accept registration information. I'm pasting the HTML into a Moodle-sourced HTML page - I switch to source mode, paste it in, looks OK when I switch back to WYSIWYNG mode, when I save the resource it gets mangled... one of the textareas contains all the HTML which follows it in the page.

Editing the resource shows that many of the < and > markers around the code after the textarea have been converted into their corresponding HTML character entities (&gt; and &lt;)...

If you want to see the code I'm using then it's here - if you view source and paste it into an editor I'd be interested to know what happens...

Any help appreciated, my head's going to explode!

Ian.

Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Ian Usher -
Oooh! Clicking on those HTML glossary entries in my post above gets me a very odd glossary. Is that just me?
Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Herbert Keijers -
No, I see it also ...

Bijlage glossary.png
Gemiddelde van de beoordelingen:  -
Als antwoord op Herbert Keijers

Re: Help! Valid HTML (attached) mangled by editor

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
It's from the Russian features course on this site.  I've turned off the "Global" setting in that glossary now.
Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Janne Mikkonen -
If you're importing html material from dreamweaver or some other editor, DO NOT edit it in this editor.

This is not a "real" editor like dreamweaver etc. It just pretend to be one as good as it can. It just can't do complicated stuff like "real" wysiwyg editors.

- Janne -
Gemiddelde van de beoordelingen:  -
Als antwoord op Janne Mikkonen

Re: Help! Valid HTML (attached) mangled by editor

door Ian Usher -

...thanks! Yes, I know it's a basic editor, but I was hoping that it wouldn't touch my (not that complicated if you look at the page) HTML. I don't want to create forms in the editor as I know it's not going to do that... I had only pasted the HTML into Dreawmeaver to do some relevant find & replace operations, followed by a paste-ing back into the editor. In particular the automatic translation of < and > into their entity equivalents is a bit worrying, particularly if I am to persuade other people to make their pre-existing HTML available (and editable) through Moodle.

I'm not sure if it is a "you can't do the <form> tag because you're editing it within a <form> tag" situation or something else...?

Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Ray Lawrence -
Ian,

How's your head? My reply won't help you at all. I created a web page resource, clicked <> in the full text section and pasted the code copied from the page source in page in the link in your original post.

Works fine!

Ray
Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Bryan Williams -
Why not just include this form as a Resource (Link to a file or web site) within Moodle? 
Gemiddelde van de beoordelingen:  -
Als antwoord op Bryan Williams

Re: Help! Valid HTML (attached) mangled by editor

door Ian Usher -

I could do that, but I'd like to establish the link to the form from within a Moodle-created page and then have my editors / teachers maintain the look of the form without depending on anyone else to make changes to it.

I will do that if all else fails, but I still got a hope that it won't!

Gemiddelde van de beoordelingen:  -
Als antwoord op Ian Usher

Re: Help! Valid HTML (attached) mangled by editor

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
It works OK for me in a HTML Resource, no problems. I switched to source mode in the editor, pasted it in and saved it. It will not work in an area like forums where students have access, because the code is stripped of forms and things for security reasons.
Gemiddelde van de beoordelingen:  -