attached patch

* improves form_allowed_tags_text() which is used to show the "Allowed HTML tags" below textareas. currently, this only appears when "Filter HTML tags" is set to "Strip tags". for "Do not filter" and "Escape tags", it doesn't display and leaves the user in the dark about what will happen to her HTML tags.

with this patch, every "Filter HTML tags" state is shortly documented. Additional information is given about
+ the removal of 'style' attributes (filter_style)
+ the auto nl2br (if there are no block elements)
+ the need to escape < etc.

i also introduced defines for the various filter states (FILTER_) and doxygen'ed them.

TODO: Integrate with module_compose_tips().

i consider this quite a usability improvement ("comprehensabiliy"; think of the many questions related to nl2br and not escaping special chars) and hope it gets applied

* fixes a bug in .htaccess (Options FollowSymLinks) that disables wanted parent options

CommentFileSizeAuthor
filter.patch8.65 KBax

Comments

gábor hojtsy’s picture

One of the points of introducing filter.module was that we can now move form_allowed_tags_text() there, and preferably rename it to filter_allowed_formatting() or something like that. This also enables us to integrate compose_tips() into filter.module putting the filter tips into the help() hook.

dries’s picture

The emitted help text is _way_ to technical.

gábor hojtsy’s picture

Ax, could you please provide a patch with the doxygen and FILTER_... constant improvements only, without modifying the filter short tips? It would be very useful IMHO.

BTW we shuold keep on dicussing how short tips will be handled by the system at that bug, where a lot of comments surfaced about this... I'll reopen that bug shortly.

dries’s picture

Removing this post from the patch queue. Awaits feedback.

jonbob’s picture

This seems obsoleted and largely fixed in HEAD.

Anonymous’s picture