Forum OpenACS Q&A: mailed webmaster@openacs.org Monday

haven't heard back so I thought I'd post here so someone can yank the right chain :)

I'm trying to post a patch to this bug in 4.5 but the bug description contains a <form> tag and patch-submit.tcl isn't calling util_convert_plaintext_to_html (although one-baf.tcl does), so this extra form is apparently breaking the submit button.

Collapse
Posted by Jeff Davis on
If you post or mail me the patch I will apply it and commit it.

Alternatively you could save the html sbumit form, fix the html and then submit from your local copy.

Collapse
Posted by Jonathan Ellis on
I tried fixing the form but it didn't work on my first try and I didn't feel like debugging it. :/  I'll mail you the patch.
Collapse
Posted by Jeff Davis on
I have looked at your patch and made a couple changes.

HR should probably be allowed by default since util_close_html_tags is
not really the right place to filter tags (I am not even sure about
nuking blink and marquee tags despite my hatred of them).  HR is quite
legitimate in a number of places the function has been used.

I changed BODY and HTML change to "remove" (otherwise if someone naively
submits a full page it will all be discarded while what you probably
want to do is discard <HEAD>...</HEAD> and simply remove HTML and BODY.

I changed the default to be remove rather than discard for
unknown tags since the consequence of discard would be removing
everything after a misspelled tag (like someone typing <STRNOG> for
example).  I am not really that sure I like removing unkown tags
but I am willing to go along with it and see if it causes anyone
problems.

btw, your example of <h2><h2/></h2> is not such a good one since
strictly speaking <h2/> is a singleton tag not an unknown tag
although I guess a number of browsers will not treat it as such
without a seperating space.

Collapse
Posted by Jonathan Ellis on
those are good changes.  Also LI needs to be set to allow.

(sorry for late reply...  notification must've gotten lost in my inbox.)