Space/Science — HabitableZone

Space/Science » in reply to The fault is entirely mine

Let's split the difference

I'd like the filter to impose fewer restrictions on expression using HTML, while still doing basic formatting and security filtering. So it's not as good as it should be, in my opinion. I"m thinking that a future version could use the HTML <CODE> tag as a flag for special processing to preserve formatting and escape angle brackets.

HTML has escape sequences for things like angle brackets. The pattern is an ampersand, a keyword, and terminating semicolon. The special case for a displayable ampersand is &amp;. The ones I use frequently:

< = &lt;
> = &gt;
& = &amp;
© = &copy;
™ = &trade;

The filter handles orphaned angle brackets by escaping them, so you normally don't need to do anything special when you use them as comparison operators. It only gets complicated when you form closed tags with matching pairs of brackets, because the filter will simply delete tags not on the approved HTML list (inclusive list). So you should escape angle brackets when you're presenting HTML or XML code.

BTW, just responded to your email, had a question about which attachment to post.

Log in or register to post.

The whole thread (45 posts)