Socket
Socket
Sign inDemoInstall

jade

Package Overview
Dependencies
Maintainers
0
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

5

History.md
0.8.1 / 2011-03-04
==================
* Added `pre` pipe-less text support (and auto-escaping)
0.8.0 / 2011-03-04

@@ -3,0 +8,0 @@ ==================

21

lib/compiler.js

@@ -156,2 +156,3 @@

if (tag.text) this.buffer(utils.text(tag.text[0].trimLeft()));
this.escape = 'pre' == tag.name;
this.visit(tag.block);

@@ -187,3 +188,5 @@ this.buffer('</' + name + '>');

visitText: function(text){
this.buffer(utils.text(text.join('\\n')));
text = utils.text(text.join('\\n'));
if (this.escape) text = escape(text);
this.buffer(text);
this.buffer('\\n');

@@ -309,1 +312,17 @@ },

};
/**
* Escape the given string of `html`.
*
* @param {String} html
* @return {String}
* @api private
*/
function escape(html){
return String(html)
.replace(/&(?!\w+;)/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
}

2

lib/jade.js

@@ -20,3 +20,3 @@

exports.version = '0.8.0';
exports.version = '0.8.1';

@@ -23,0 +23,0 @@ /**

@@ -33,3 +33,3 @@

var textOnly = exports.textOnly = ['script', 'textarea', 'style'];
var textOnly = exports.textOnly = ['pre', 'script', 'textarea', 'style'];

@@ -36,0 +36,0 @@ /**

{
"name": "jade",
"description": "Jade template engine",
"version": "0.8.0",
"version": "0.8.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "main": "./index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc