Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@it-era/ngx-safe-pipes

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@it-era/ngx-safe-pipes

This library provide convenient pipes to bypass Angular built-in sanitization and get rid off the `unsafe value used in a ... context`.

Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
17
-37.04%
Maintainers
2
Weekly downloads
 
Created
Source

NgxSafePipes

This library provide convenient pipes to bypass Angular built-in sanitization and get rid off the unsafe value used in a ... context.

Installation

Install with npm :

npm i @it-era/ngx-safe-pipes

And add the NgxSafePipesModule into the imports array of your module (containing the template to fix) :

import { NgxSafePipesModule } from '@it-era/ngx-safe-pipes';

// ...

@NgModule({
    imports: [
        NgxSafePipesModule,
        // ...
    ]
})
export class YourModule { }

List of pipes

SafeHtml

Usage :

<div [InnerHTML]="trustedHtml | safeHtml"></div>

SafeResourceUrl

Usage :

<iframe [src]="trustedSrc | safeResourceUrl"></iframe>

SafeScript

Usage :

<script [src]="trustedSrc | safeScript"></script>

SafeStyle

Usage :

<style [src]="trustedSrc | safeStyle"></style>

SafeUrl

Usage :

<a [href]="trustedHref | safeUrl"></a>

WARNING: calling thoses methods with untrusted user data exposes your application to XSS security risks!

FAQs

Package last updated on 04 Jun 2019

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