#18533379 아이피와 MMS 링크 지원 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7017 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2009-12-09 02:33:50 +00:00
parent e4318249d6
commit a5bae0fb01
2 changed files with 5 additions and 3 deletions

View file

@ -4,9 +4,9 @@
* @author taggon (gonom9@gmail.com)
*/
(function($){
var protocol_re = '(https?|ftp|news|telnet|irc)://';
var protocol_re = '(https?|ftp|news|telnet|irc|mms)://';
var domain_re = '(?:[\\w\\-]+\\.)+(?:[a-z]+)';
var max_255_re = '(?:1[0-9]{2}|2[0-4][0-9]|25[0-5])';
var max_255_re = '(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]?)';
var ip_re = '(?:'+max_255_re+'\\.){3}'+max_255_re;
var port_re = '(?::([0-9]+))?';
var path_re = '((?:/[\\w!"$-/:-@]+)*)';

View file

@ -51,7 +51,7 @@ describe('AutoLink functionality', {
value_of( $('#test5').contents().length ).should_be(3);
},
"#test6 - complex example" : function() {
value_of( $('#test6 a').length ).should_be(4);
value_of( $('#test6 a').length ).should_be(6);
value_of( $('#test6 a').eq(0).attr('href') ).should_be($('#test6 a').eq(0).text());
value_of( $('#test6 a').eq(2).parent().is('b') ).should_be_true();
value_of( $('#test6 > textarea > a').length ).should_be(0);
@ -94,6 +94,8 @@ describe('Autolink trigger', {
<a href="http://mygony.com" target="_self">http://mygony.com</a>
Sayonara~
</div>
IP Test http://119.205.243.46 and MMS Link mms://xpressengine.com/a.wmv
Is it OK?
</div>
<div id="test7">http://mygony.com</div>
<div id="test8">Go to http://mygony.com</div>