![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Safely parse HTML string into DOM using DOMParser or falling back to DOMImplementation.
Safely parse an HTML string into DOM using DOMParser
or falling back to DOMImplementation
.
domParse(markup)
domParse(markup, options)
markup
string of HTML you'd like to parseoptions
object of optionsNodeList
, or false
if there was a parser error.
import domParse from 'dom-parse';
domParse('Some <em>awesome</em> markup <img src="explosion.gif" />');
// returns [#text, <em>, #text, <img>]
By default dom-parse is in strict mode, which will parse the markup as XHTML/XML, requiring all tags to be closed:
domParse('<img src="dealwithit.gif">');
// returns false
domParse('<p>Some lazy markup');
// returns false
You can disable strict mode optionally:
domParse('<img src="dealwithit.gif">', { strict: false });
// returns [<img>]
domParse('<p>Some lazy markup');
// returns [p]
Uses DOMParser from xmldom.
v1.2.1 - 2017-09-18
dom-parse.js
.FAQs
HTML/XML to DOM parser for browsers and Node.js
The npm package dom-parse receives a total of 6,826 weekly downloads. As such, dom-parse popularity was classified as popular.
We found that dom-parse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.