Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 886201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:01:52+00:00 2026-05-15T13:01:52+00:00

I am trying to figure out all the ways javascript can be written. I

  • 0

I am trying to figure out all the ways javascript can be written. I am making a white list of acceptable tags however the attributes are getting me.

In my rich html editor I allow stuff like links.

<a href="">Hi </a>

Now I am using html agility pack to get rid of attributes I won’t support and html tags for that matter.

However I am still unclear if a person could do something like this

<a href="<script>alert('hi')</script>">Bad </a>

So I am not sure if I have to start looking at the inner text of all attributes that I support and html encode them? Or if what.

I am also not sure how to prevent a html link that goes to some page and launches some javascript on load.

I am not sure if a white list can stop that one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:01:53+00:00Added an answer on May 15, 2026 at 1:01 pm
    <a href="javascript:void(0)" onclick="alert('hi');">Bad</a>
    

    or

    <a href="javascript:alert('hi');">Bad</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how to list all files of an FTP folder
I've been trying to figure out how to do this all afternoon, but can't
I've been trying to figure this out all morning. Is there a way to
Trying to figure out how to write a jquery formula that will sum all
I am trying to figure out a way to force all of my Interfaces
I'm trying to figure out how to link all the views I've made in
I am trying to figure out how to count all of the numbers into
I am trying to figure out a way for somehow fetching the all the
I'm trying to figure out how to use the java.util.logging features. All of the
I'm trying to figure out why this works: >>> comments = Comment.objects.all() >>>[c.content_object for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.