Safely embedding HTML in Wikka pages



Wikka uses the SafeHTML Parser by RomanIvanov.

This parser strips down all potentially dangerous content within HTML:


Check the SafeHTML home page for more info.
Comments
Comment by JavaWoman
2005-01-09 15:40:30
Roman,
It seems SafeHTML is also stripping the callto: protocol - as I found out when I tried to add a Skype me link on my user page... (a minute ago :)) I don't see how that protocol constitutes an security risk though. Comments?
Comment by JavaWoman
2005-01-09 15:46:27
BTW, I just added the RSS feed for the SafeHTML site to my feedreader but found the feed doesn't have a title...you might want to add one ;-)
Comment by RomanIvanov
2005-01-22 13:43:51
About callto: -- Safehtml uses **white list** of protocols.

So, callto or e2k must be added to whitelist.

I'll think about it -- for distribution.
Comment by JasRandal
2005-04-12 17:38:46
Does SafeHTML also strip the blockquote tag?
Comment by JavaWoman
2005-04-13 23:25:16
JasRandal,
blockquote is *not* in the list of "dangerous tags" to be filtered out. Can't imagine how it would be dangerous either. ;-)

Have a look at the file safehtml.php in 3rdparty/code/safehtml and you can easily see what's filtered, blacklisted or whitelisted.
Comment by JasRandal
2005-04-14 12:04:30
Thanks, JW. I looked there earlier and didn't see it. I must be doing something wrong then ... but it's hard to conceive of that possibility. ;-)
Comment by KatoJenkina
2007-01-31 12:57:17
I would like to add Javascript to one particular Wikka page. Is there a way to disable SafeHTML for this purpose?
Comment by WazoO
2007-01-31 22:34:56
Suggestion .... 'build' the page/content in another file, then call/include that page on a wikka-wiki page. Think of it as an "action" for the concept.
Comment by SmackY
2009-08-28 09:53:43
ATM 3rdparty/core/safehtml/classes/safehtml.php kills off @name except on certain form control tags. <map> is currently not one of these tags but needs to be to enable client-side image maps (because <object> is prohibited we must use <img> which can only work with <map> with @usemap; for @usemap to work, <map must have @name but this is currently stripped from <map>).

Fix is simple, just add 'map' to $formControls:
var $formControls = array('input', 'select', 'textarea', 'button', 'map'); # form controls where a name attribute is valid - JavaWoman
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki