' ) ) +
( title ? ( '
' ) ) }
+ ( html5 ? 'diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/README.md b/README.md index 372a898..f3b572f 100644 --- a/README.md +++ b/README.md @@ -106,3 +106,31 @@ assert.equal( .join('') ) ``` +Hyperlinks will be encoded automatically: + +```javascript + +/* +BUG: This doesn't work! + +var plaintext = 'This is a great website: http://example.com/' + +console.log(plaintext) + > This is a great website: http://example.com/ + +console.log( html( { content: [ plaintext ] } ) ) + >
This is a great website: http://example.com/">http://example.com/
This is a great website: http://example.com/
Email bob@example.com for more information.