Changeset 634


Ignore:
Timestamp:
01/11/07 00:06:26 (11 years ago)
Author:
ray
Message:

Ticket #901 automatic conversion of URLs to links broken

  • fixed issue
  • added config var xinha_config.convertUrlsToLinks default false (which is consistent for URLs, because these weren't converted before due to the bug and inconsisten for email addresses)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r632 r634  
    371371  // set to false if you want to allow JavaScript in the content, otherwise <script> tags are stripped out 
    372372  this.stripScripts = true; 
     373 
     374  // see if the text just typed looks like a URL, or email address 
     375  // and link it appropriatly 
     376  this.convertUrlsToLinks = false; 
    373377   
    374378  // size of color picker cells 
     
    45524556        // and link it appropriatly 
    45534557        case 32: 
    4554           if ( s && s.isCollapsed && s.anchorNode.nodeType == 3 && s.anchorNode.data.length > 3 && s.anchorNode.data.indexOf('.') >= 0 ) 
     4558          if ( this.config.convertUrlsToLinks && s.isCollapsed && s.anchorNode.nodeType == 3 && s.anchorNode.data.length > 3 && s.anchorNode.data.indexOf('.') >= 0 ) 
    45554559          { 
    45564560            var midStart = s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/); 
     
    45784582            } 
    45794583 
    4580             RE_date = /[0-9\.]*/; //could be date or ip or something else ... 
     4584            RE_date = /([0-9]+\.)+/; //could be date or ip or something else ... 
    45814585            RE_ip = /(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/; 
    45824586            var mUrl = matchData.match(HTMLArea.RE_url); 
Note: See TracChangeset for help on using the changeset viewer.