Posted by lootgoal |
|
What can lxml do? Verify whether the xhtml is valid? But it doesn't mean the post is safe. Yes you can filter out certain dangerous tags on the server side but it's still a "explicitly forbidden or it's allowed" approach, and it's not as secure as "explicitly allow or it's forbidden". And you have to constantly patch your filter whenever a new feature, and the corresponding HTML extension, is developed on any major browser.
Also as mentioned in the other thread, markup is easier to write by hand, not everyone likes WYSIWYG. For a forum may be not, but for a wiki many people will definitely prefer a plain textfield. Oh, and also, directly using the HTML generated by tinymce is also the opposite of "clean code". A bold line which uses <strong> now will probably become <span style="font-weight:bold"> tomorrow. You can view the effort to convert HTML to a custom markup as equivalent to trying to get rid of these differences. --- Last Edited by lootgoal at 2009-07-05 11:04:00 --- |
|
Posted by Herbert Poul |
|
to be honest, i'm not sure (yet) how exactly lxml works. but it contains a html cleaner so i hope it is made to be safe (ie. whitelist tags, instead of forbidding certain dangerous tags).
well, it is certainly a matter of which users you have - if they would care to edit the source directly. for most use cases i have today a wysiwyg editor would be perfect, since it's basically a way of doing content management - how do i get my content on the website the easiest way possible. there are only three advantages i can see on using a custom markup.. 1.) modify your content offline and just copy&paste it 2.) use your content both in plain text file (e.g. for configuration) as well as in your wiki (just as i do with parts of the Documentation of SCT) 3.) easy diffing of wiki changes. ad 1.) this would need a custom solution, but i don't really see this as a problem anymore.. everyone as internet connection anyway ad 2.) if you have regexes to convert to/from XHTML .. use them to export it from the website into your plaintext file :) at least you only need to care about the 'from xhtml' regex ad 3.) there are ways to display nice diffs for HTML markup.. even lxml can do it (although no idea how good it works) have i missed some features of editing the markup? hmm.. maybe that you don't need the mouse.. but than again.. you can easily add keyboard shortcuts (and bold/underline/lists/etc. have keyboard shortcuts and they are the same as users are used to in their word processors) Hey, we have Signatures !!! Great, isn't it ? ;) |