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 7576711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:59:16+00:00 2026-05-30T16:59:16+00:00

On Chrome I’m getting an error Refused to execute a JavaScript script. Source code

  • 0

On Chrome I’m getting an error Refused to execute a JavaScript script. Source code of script found within request. after posting data that contains the name of the domain (also note the lack of javascript on either page) .

badpage1.html:

<form action="/badpage2.html" method="post">
<input type="hidden" name="name" value="href=%22http://www.w3.org/%22"/>
<input type="submit" name="submit"/>
</form>

badpage2.html:

<!DOCTYPE html>
<html>
    <head>
        <base href="http://www.w3.org/"/>
    </head>
    <body>
        <img src="Icons/w3c_home" alt="">
    </body>
</html>

If you go directly to badpage2.html the image will show, but if you go to it via badpage1.html, the image will not show (base tag doesn’t work).

Is this a bug in Chrome XSS detection? And if it’s not, how would I bypass this? It seems silly to encode the posted data just to bypass this filter.

EDIT:

In my case, the post value sent is to update part of the content of the page. The problem comes if it contains happens to contain the domain name that is used in the <base> (as this example does) it will trigger the XSS detection which disables the <base> tag.

  • 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-30T16:59:17+00:00Added an answer on May 30, 2026 at 4:59 pm

    I found out that I can send the custom HTTP header X-XSS-Protection on the page that is being messed up due to the protection.

    I use the below code for my PHP solution:

    header( "X-XSS-Protection: 0" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is Chrome beeping during a removeAllRanges(); to indicate an error in the code, or
When using Google Chrome, I want to debug some JavaScript code. How can I
Chrome display this error in console Unsafe JavaScript attempt to access frame with URL
After test driving Google Chrome for 30 minutes or so, I like it, even
Given that Chrome and Safari use webkit has anyone yet found anything that renders
chrome.tabs.executeScript(null, {code:$.each(selectValues, function(key=' + timestamp + ', value='Custom') { $('#expire'). append($(\<option></option>\). attr(\value\,key). text(value)); });});
Chrome is wrongly reporting width and height values for images during, or just after,
Chrome (or any other webkit browser) throws a ton of these Unsafe JavaScript attempt
Chrome does not appear to give any indication that a page has JavaScript errors,
Google Chrome seems to be blocking a popup I am creating via jQuery. After

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.