TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rj dk
NA
5
698
handling dom element cross site scripting in angularjs
Jun 4 2020 1:54 AM
I have to handle a XSS vulnerability in my AngularJs codes, where I'm trying to create a dynamic a tag with href link and then try to download the file. Below is the code reference. But, not sure how to check vulnerability and handle it for XSS in AngularJS by using no external library. Is it possible to do with sanitize.js files in angular? Any help will be appreciated.
var file =
new
Blob([data],{type:
false
});
var fileURL = URL.createObjectURL(file);
var a = document.createElement(
'a'
);
a.href = fileURL;
a.target =
'_blank'
;
a.download =
"TestFile.pdf"
;
document.body.appendChild(a);
a.click();
Reply
Answers (
0
)
Global Angular CLI version greater than local version?
Radio Button in Angular 6 Nested Form not working