"<" is behaving weirdly in comments

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

"<" is behaving weirdly in comments

Post by Mangek »

Hello!

One of my guests left a heart in the comments for the post (a la "<3") which caused both the heart and everything that followed to not being shown. (I only found out about this after checking the comments in the admin-section, where the body of the comment was strangely fully shown).

I edited the comment, adding a space between the < and 3, and now it displays the full comment, but it looks a little wird. I tried swapping < to either < or < but that just causes it being displayed as text.

Any ideas what could be wrong?
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: "<" is behaving weirdly in comments

Post by yellowled »

Mangek wrote:Any ideas what could be wrong?
Unless you have the Textile or Markdown plugins activated for comments, I assume this is a result of s9y stripping HTML from comments by default. <3 is interpreted as HTML, < 3 is not(?). Or maybe you're using the plugin "Transforms HTML for comments"? It's still viewable in the admin backend since the stripping is only applied in the frontend, btw.

Anyway, this is not "wrong" as such but rather some kind of backfiring effect of the HTML stripping or interpretation. Not sure there's much you can do about it besides advocate your commentators not to use HTML special characters in comments. If your blog is in UTF-8, people could just use ♥ (if they can find it on the keyboard, for that matter) :)

YL
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: "<" is behaving weirdly in comments

Post by Mangek »

I tried both textile and Markdown, neither which made any difference. The "Transforms HTML.." did the trick however. Thanks YL! :)
wismith
Posts: 1
Joined: Thu Nov 24, 2011 8:25 pm

Re: "<" is behaving weirdly in comments

Post by wismith »

yellowled wrote:If your blog is in UTF-8, people could just use ♥ (if they can find it on the keyboard, for that matter) :)
Where can this symbol be found?
Eni
Regular
Posts: 62
Joined: Thu Jan 27, 2005 10:47 pm
Location: Münster, Germany

Re: "<" is behaving weirdly in comments

Post by Eni »

wismith wrote:
yellowled wrote:If your blog is in UTF-8, people could just use ♥ (if they can find it on the keyboard, for that matter) :)
Where can this symbol be found?
2764 is the hex. Either with Alt on Windows, or Shift+Ctrl+U on Linux, or bookmark a copy/paste list, oooor create yourself keyboard shortcuts for often used characters (◕‿‿◕)

http://fsymbols.com/keyboard/ <- about the keyboard input
http://www.fileformat.info/info/unicode ... /index.htm <- character info

✽ ✾ ✿ ❀ ❁ ❃ ❋

~eni
Last edited by Eni on Thu Nov 24, 2011 9:14 pm, edited 3 times in total.
Sorry, I'm Late. But I Got Lost On The Road Of Life.
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: "<" is behaving weirdly in comments

Post by Mangek »

wismith wrote:Where can this symbol be found?
On the keyboard, no idea, but I did a quick search and found a page with lots of symbols that you could copy & paste.
Post Reply