views:

94

answers:

2

I have a client with a "Directions" page in their website and they wanted to add a Google map to the page, so they went to maps and put in their location and then used the "embed" link to get the html for the iframe. They then opened up the Flatpage for "Directions" page in the admin and went to html mode in TinyMCE and then pasted in the code, but as soon as they save the code is gone and there is no map, just the div tags that surrounded the iframe are left.

I have tried Googling and I have repeated the process myself but no success, does anyone know if you are just not allowed to insert iframe html into the body of a Flatpage in django?

+2  A: 

Unless you've added some kind of additional validation/cleaning, flatpages would not remove anything from the content. Have you tried without TinyMCE?

update: The point isn't that you'd leave TinyMCE disabled; the point is to narrow down where the problem is, so you can actually fix it. And I'm almost certain the problem here is TinyMCE, not Django.

Carl Meyer
Did not try without TinyMCE as without TinyMCE being able to edit the page would not due the client much good since they are not tech savvy enough.
Shane
Yes, it is exactly about TinyMCE;)
israkir
A: 

I would suspect that tiny-mce is garbling something up. I'd try to disable tinymce and see if you have the same problem. Also, make sure you're using the 'safe' filter on the text in the templates. Otherwise Django will escape all the HTML.

f4nt