diff --git a/src/formattedJSON.js b/src/formattedJSON.js index bdda14e..fbeeeb2 100644 --- a/src/formattedJSON.js +++ b/src/formattedJSON.js @@ -236,12 +236,18 @@ if( collapsible ) { class_names.push( "collapsible" ); } if( collapsed ) { class_names.push( "closed" ); } + var output = document.createTextNode( obj ); + + if (/^(http|https):\/\/[^\s]+$/.test( obj )) { + output = this._html( '' + obj + '' ); + } + return this._append( this._html( '
' ), this._html( collapsible ? '' : '', '"', - this._append( this._html( '' ), document.createTextNode( obj ) ), + this._append( this._html( '' ), output ), '"', ',' )