New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

derby-parsing

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derby-parsing - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

package.json
{
"name": "derby-parsing",
"version": "0.5.0",
"version": "0.5.1",
"description": "Add HTML template parsing to Derby",

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

@@ -19,3 +19,3 @@ var expect = require('expect.js');

, view: 'section'
, html: '<b>Qua?</b>'
, html: '<b class="foo">Qua?</b>'
, tag: 'strong'

@@ -195,3 +195,3 @@ }

it('unescaped HTML', function() {
test('<div>{{unescaped _page.html}}</div>', '<div><b>Qua?</b></div>');
test('<div>{{unescaped _page.html}}</div>', '<div><b class="foo">Qua?</b></div>');
});

@@ -527,2 +527,56 @@

it('HTML content escapes a literal view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="<b>Hi</b>"></view>');
views.register('partial', '{{@text}}');
var view = views.find('body');
expect(view.get(context)).equal('&lt;b>Hi&lt;/b>');
});
it('HTML content escapes a path expression view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="{{_page.html}}"></view>');
views.register('partial', '{{@text}}');
var view = views.find('body');
expect(view.get(context)).equal('&lt;b class="foo">Qua?&lt;/b>');
});
it('HTML content escapes a complex template view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="{{_page.html}} bar"></view>');
views.register('partial', '{{@text}}');
var view = views.find('body');
expect(view.get(context)).equal('&lt;b class="foo">Qua?&lt;/b> bar');
});
it('HTML attribute escapes a literal view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="<b class=&quot;foo&quot;>Hi</b>"></view>');
views.register('partial', '<div data-text="{{@text}}"></div>');
var view = views.find('body');
expect(view.get(context)).equal('<div data-text="<b class=&quot;foo&quot;>Hi</b>"></div>');
});
it('HTML attribute escapes a path expression view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="{{_page.html}}"></view>');
views.register('partial', '<div data-text="{{@text}}"></div>');
var view = views.find('body');
expect(view.get(context)).equal('<div data-text="<b class=&quot;foo&quot;>Qua?</b>"></div>');
});
it('HTML attribute escapes a complex template view attribute', function() {
var views = new templates.Views();
context.meta.views = views;
views.register('body', '<view is="partial" text="{{_page.html}} bar"></view>');
views.register('partial', '<div data-text="{{@text}}"></div>');
var view = views.find('body');
expect(view.get(context)).equal('<div data-text="<b class=&quot;foo&quot;>Qua?</b> bar"></div>');
});
});
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