I have an image I want to put in an FAQ with rollovers based upon a map (using the <map> tag). I have been putting the code into the html editor, but when I click the "Update" button it seems to remove the <map> section of code. Is this expected behavior? Is there a way to fix this?
I am using version 2.0.1.
TIA,
Drew
html <map> tag
Moderator: Thorsten
Working in the WYSIWYG editor, I click on the "Edit HTML Source" button. It opens a new window with the html code for my FAQ in it. I add the html code which includes the <map> tag, and click on the "Update" button. The image doesn't show up correctly. I reopen the html source code (by clicking the "Edit HTML Source" button), and the <map> section of code is no longer there.
Thanks,
Drew
Thanks,
Drew
Hi Drew,
Ciao,
Matteo
the reason why Thorsten asked you how did you get the <map> tag is 'cause we filter many HTML tags to prevent XSS injection. If you want to enable that tag look e.g. at this post or e.g. this post.dboone wrote:and the <map> section of code is no longer there.
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
I looked at the first post you referred me to, and I am still not exactly sure what I need to do. (I don't know php, so please excuse my helplessness in this matter)
Do I need to edit both inc/Faq.php and inc/Init.php?
Within the code...
...should I add tags to this list to allow them, or remove them from this list to allow them?
TIA,
Drew
Do I need to edit both inc/Faq.php and inc/Init.php?
Within the code...
Code: Select all
...
// remove really unwanted tags
do {
$oldstring = $string;
$string = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$string);
} while ($oldstring != $string);
...
TIA,
Drew
Hi Drew,
Ciao,
Matteo
Only inc/Init.phpdboone wrote:Do I need to edit both inc/Faq.php and inc/Init.php?
This "piped" list contains those tags that will be removed for security reasons.dboone wrote:...should I add tags to this list to allow them, or remove them from this list to allow them?
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Thanks Matteo. I thought that was what I was supposed to do.
However, the tag that I want to allow is not included in this list. So, it appears that this is NOT the function that is removing the <map> tag.
I hope I am communicating what is happening well enough, and that I have not been unintentionally misleading in my previous posts about the problem. Maybe I should give a more detailed description of what is happening.
I am working to edit an faq entry using the WYSIWYG editor. (I think it is called TinyMCE). I want to add a map to an image that I placed in my faq entry. I select the image and click on the "insert/edit image" button on the tool bar of the WYSIWYG editor and the "insert/edit image" window opens. I click on the "Advanced" tab and enter the name of the map in the "Image Map" field in the Miscellaneous section. I then click the "Update" button and the window closes. So, I have specified the name of the map to be used for this image.
I must now add the map to the html code. So, still working in the WYSIWYG editor, I click on the "Edit HTML Source" button. The "Edit HTML Source" window opens and I add my map code below the img code and I click on the "Update" button. The window closes, but the image and map don't behave as I want the to in the WYSIWYG editor. (i.e. the rollovers I have mapped don't work) So, I click on the "Edit HTML Source" button again to check for errors in the HTML code, but the map section of code I previously added is missing.
So, all of this occurs within the context of editing an faq entry, and not when I "save" the entry I have been editing. (I don't know if I have been explicit about this in previous posts.) So, it seems that the code is being removed by TinyMCE rather than the PHP scripts you pointed me to. (but I could be wrong here)
Thanks for all your help with this problem.
Drew
P.S. I am using FireFox for Mac OS as my browser. I don't know if this matters or not, but I thought I would let you know.
However, the tag that I want to allow is not included in this list. So, it appears that this is NOT the function that is removing the <map> tag.
I hope I am communicating what is happening well enough, and that I have not been unintentionally misleading in my previous posts about the problem. Maybe I should give a more detailed description of what is happening.
I am working to edit an faq entry using the WYSIWYG editor. (I think it is called TinyMCE). I want to add a map to an image that I placed in my faq entry. I select the image and click on the "insert/edit image" button on the tool bar of the WYSIWYG editor and the "insert/edit image" window opens. I click on the "Advanced" tab and enter the name of the map in the "Image Map" field in the Miscellaneous section. I then click the "Update" button and the window closes. So, I have specified the name of the map to be used for this image.
I must now add the map to the html code. So, still working in the WYSIWYG editor, I click on the "Edit HTML Source" button. The "Edit HTML Source" window opens and I add my map code below the img code and I click on the "Update" button. The window closes, but the image and map don't behave as I want the to in the WYSIWYG editor. (i.e. the rollovers I have mapped don't work) So, I click on the "Edit HTML Source" button again to check for errors in the HTML code, but the map section of code I previously added is missing.
So, all of this occurs within the context of editing an faq entry, and not when I "save" the entry I have been editing. (I don't know if I have been explicit about this in previous posts.) So, it seems that the code is being removed by TinyMCE rather than the PHP scripts you pointed me to. (but I could be wrong here)
Thanks for all your help with this problem.
Drew
P.S. I am using FireFox for Mac OS as my browser. I don't know if this matters or not, but I thought I would let you know.