can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r18907: LJSUP-8613: User ID is replaced with RTE...

Committer: dpetrov
LJSUP-8613: User ID is replaced with RTE editor
U   trunk/htdocs/js/rte.js
Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-04-19 05:47:56 UTC (rev 18906)
+++ trunk/htdocs/js/rte.js	2011-04-19 07:43:59 UTC (rev 18907)
@@ -281,6 +281,10 @@
 		.replace(/<span[^>]*?class="ljuser[^>]*?><a href="http:\/\/(?:community|syndicated)\.[-.\w]+\/([\w]+)\/.*?<b>([^<]+)?<\/b><\/a><\/span>/g, '<lj comm="$1" title="$2"/>')
 		.replace(/<span[^>]*?class="ljuser[^>]*?><a href="http:\/\/users\.[-.\w]+\/([\w]+)\/.*?<b>\1<\/b><\/a><\/span>/g, '<lj user="$1"/>') // username with special symbol
 		.replace(/<span[^>]*?class="ljuser[^>]*?><a href="http:\/\/users\.[-.\w]+\/([\w]+)\/.*?<b>([^<]+)?<\/b><\/a><\/span>/g, '<lj user="$1" title="$2"/>')
+
+		//handle ext_ nicknames
+		.replace(/<span[^>]*?class="ljuser[^>]*?lj:user="([_\d\w]+)"[^>]*?><a>?(.*?)<\/a><a[^<]*?<b>([^<]+)?<\/b><\/a><\/span>/g, '<lj user="$1" title="$3"/>')
+
 		.replace(/<span[^>]*?class="ljuser[^>]*?><a href="http:\/\/([-\w]+)\..*?<b>([^<]+)?<\/b><\/a><\/span>/g, '<lj user="$1" title="$2"/>')
 		.replace(/<\/lj>/g, '');
 	

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments