Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webex/helper-html

Package Overview
Dependencies
Maintainers
7
Versions
1229
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webex/helper-html

HTML Utiltities

  • 3.3.1-next.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.4K
decreased by-4.31%
Maintainers
7
Weekly downloads
 
Created
Source

@webex/helper-html

standard-readme compliant

HTML filter for the Cisco Webex JS SDK. See https://webex.github.io/webex-js-sdk/

Note: This package relies on DOM apis and largely returns noops in node environments.

Install

npm install --save @webex/helper-html

Usage

filter(allowedTags, allowedStyles, html)

Filters an html string such that it only includes the allowed tags and styles. Disallowed tags and styles are removed while their contents are kept.

allowedTags is an object keyed on tag name mapped to an array of attribuets allowed for that tag. allwedStyles is an array of allowed style string. html is a string.

Returns a promise that resolves with the new html string.

filterSync()

See filter()

filterEscape(processCallback, allowedTags, allowedStyles, html)

Filters an html string such that it only includes the allowed tags and styles. Disallowed tags and styles and their children are escaped.

processCallback synchronous callback that receives the body of the html fragment generated from html. Presents an opportunity to do preprocessing (e.g turn urls into links) without parsing html mulitple times allowedTags is an object keyed on tag name mapped to an array of attribuets allowed for that tag. allwedStyles is an array of allowed style string. html is a string.

Returns a promise that resolves with the new html string.

filterEscapeSync()

See filterEscape()

Maintainers

This package is maintained by Cisco Webex for Developers.

Contribute

Pull requests welcome. Please see CONTRIBUTING.md for more details.

License

© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

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.

Install

Related posts

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