Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does \u003C mean?

Tags:

javascript

I'm looking at twitter's javascript file, and I see this in the templates hash:

Browse Interests{{/i}}\u003C/a\u003E\n        \u003C/li\u003E\n  {{#logged_in}}\n 

What do those codes represent?

like image 207
Blankman Avatar asked Feb 01 '11 03:02

Blankman


2 Answers

It's a unicode character. In this case \u003C and \u003E mean :

U+003C < Less-than sign

U+003E > Greater-than sign

See a list here

like image 148
Raynos Avatar answered Sep 30 '22 23:09

Raynos


That is a unicode character code that, when parsed by JavaScript as a string, is converted into its corresponding character (JavaScript automatically converts any occurrences of \uXXXX into the corresponding Unicode character). For example, your example would be:

Browse Interests{{/i}}</a>\n        </li>\n  {{#logged_in}}\n 

As you can see, \u003C changes into < (less-than sign) and \u003E changes into > (greater-than sign).

In addition to the link posted by Raynos, this page from the Unicode website lists a lot of characters (so many that they decided to annoyingly group them) and this page has a (kind of) nice index.

like image 41
jhartz Avatar answered Sep 30 '22 22:09

jhartz