Socket
Socket
Sign inDemoInstall

@riotjs/parser

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riotjs/parser - npm Package Compare versions

Comparing version 4.3.0 to 4.3.1

3

CHANGELOG.md
# Changes for riot-parser
### v4.3.1
- Improve the inline `<script>` tags check
### v4.3.0

@@ -4,0 +7,0 @@ - Add support for inline script tags (`<script src='path/to/the/script'>`)

6

index.js

@@ -1549,6 +1549,7 @@ 'use strict';

const attrs = node.attributes;
const isCoreTag = (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG);
if ([JAVASCRIPT_TAG, STYLE_TAG].includes(name)) {
if (isCoreTag) {
// Only accept one of each
if (store[name] && (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG)) {
if (store[name]) {
panic(this.store.data, duplicatedNamedTag.replace('%1', name), node.start);

@@ -1559,3 +1560,2 @@ }

store.scryle = store[name];
} else {

@@ -1562,0 +1562,0 @@ // store.last holds the last tag pushed in the stack and this are

{
"name": "@riotjs/parser",
"version": "4.3.0",
"version": "4.3.1",
"description": "The parser for Riot tags",

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

@@ -131,6 +131,7 @@ /*---------------------------------------------------------------------

const attrs = node.attributes
const isCoreTag = (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG)
if ([JAVASCRIPT_TAG, STYLE_TAG].includes(name)) {
if (isCoreTag) {
// Only accept one of each
if (store[name] && (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG)) {
if (store[name]) {
panic(this.store.data, duplicatedNamedTag.replace('%1', name), node.start)

@@ -141,3 +142,2 @@ }

store.scryle = store[name]
} else {

@@ -144,0 +144,0 @@ // store.last holds the last tag pushed in the stack and this are

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