Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -398,6 +398,10 @@ |
399 | 399 | s = s.replace( /\n\s+\*?([^\n]*)/g, '\n<li>$1</li>' ); // <li> around bulleted lines |
400 | 400 | } |
401 | 401 | s = s.replace( /\n(?!<)/, '\n<br/>' ); |
| 402 | + s = s.replace( /(?:https?:)?\/\/[^\s<>]+/g, function( s ) { |
| 403 | + // linkify URLs, input is already HTML-escaped above |
| 404 | + return '<a href="' + s + '">' + s + '</a>'; |
| 405 | + } ); |
402 | 406 | return s; |
403 | 407 | } |
404 | 408 | |