Wedge

Public area => The Pub => Bug reports => Topic started by: Arantor on February 16th, 2013, 09:34 PM

Title: Raw HTML in Custom Profile Fields
Post by: Arantor on February 16th, 2013, 09:34 PM
This has multiple consequences, depending on your perspective.

So, I created a dropdown with both raw HTML and bbcode in it, as I couldn't remember whether it allowed either or neither or what. bbcode is unparsed, understandably.

Now, raw HTML is not supported as such. I'm willing to take it that this is a security measure, because the way it is implemented, the value is stored as-is in the DB and displayed without further processing later on. So it would be a security issue to just accept and handle raw HTML there, and naturally it is htmlspecialchars'ified before use.

This leads us to the interesting situation where inside the dropdown, the htmlspecialchars'ified text will be rendered as HTML inside the selectbox.

Which means there's one bug, in that the content isn't twice-parsed.


There is a separate side bug related to the selectbox. I have a piece of text with an image that's substantially bigger than a single line of text. It was the first image at hand, and was 40x40. When the selectbox is expanded, it is displayed normally. But when closed and it is the selected item, something else happens entirely. See attached. The picture shows both the expanded behaviour and the unexpanded behaviour (i.e. it doesn't change height, and the text is base-line aligned, so the text is actually out of sight)

I'm not sure what *should* be the ideal behaviour here, though.
Title: Re: Raw HTML in Custom Profile Fields
Post by: live627 on May 25th, 2013, 03:04 AM
Quote
There is a separate side bug related to the selectbox. I have a piece of text with an image that's substantially bigger than a single line of text. It was the first image at hand, and was 40x40. When the selectbox is expanded, it is displayed normally. But when closed and it is the selected item, something else happens entirely. See attached. The picture shows both the expanded behaviour and the unexpanded behaviour (i.e. it doesn't change height, and the text is base-line aligned, so the text is actually out of sight)
Most (if not all) people using images in the options will treat them as icons. That said, I think the height should be elastic, jut like the width.
Title: Re: Raw HTML in Custom Profile Fields
Post by: Nao on May 25th, 2013, 02:48 PM
Quote from live627 on May 25th, 2013, 03:04 AM
Quote
There is a separate side bug related to the selectbox. I have a piece of text with an image that's substantially bigger than a single line of text. It was the first image at hand, and was 40x40. When the selectbox is expanded, it is displayed normally. But when closed and it is the selected item, something else happens entirely. See attached. The picture shows both the expanded behaviour and the unexpanded behaviour (i.e. it doesn't change height, and the text is base-line aligned, so the text is actually out of sight)
Most (if not all) people using images in the options will treat them as icons. That said, I think the height should be elastic, jut like the width.
Easier said than done...
I spent weeks, perhaps months on this select box rewrite... I'm proud of it, but I'm perfectly aware it has a few shortcomings.
Yet, I'm not ready to... Delve into that again..! :^^;: