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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:32:38+00:00 2026-05-13T07:32:38+00:00

Put this in your location bar in IE javascript:location.href=’http://www.google.com/search?q=something&lt=bar’ Watch in horror as it

  • 0

Put this in your location bar in IE

javascript:location.href='http://www.google.com/search?q=something&lt=bar'

Watch in horror as it helpfully thinks &lt actually means &lt; and makes it a <.

WTF is going on here?

Other browsers don’t do this.
How do I prevent IE from doing this?

  • 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-13T07:32:38+00:00Added an answer on May 13, 2026 at 7:32 am

    Since this is part of an HTML document you should escape the & by replacing it by &amp;

    An ampersand ‘&’ in HTML mark the start of a character reference entity such as &lt; &gt; and &eacute;

    Literal ampersands in your document should be written as &amp;

    Note that if that code is generated dynamical you should also escape the URL so that it can appear in a JavaScript string as well.

    Edited: I can confirm this particular problem occurs when pasting JavaScript code directly in the address bar. It seems HTML character escaping rules are irrelevant here after all.

    I’ve googled a bit and found this blog post which identify that particular behavior as an ie bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: I put this snippet of code in jsbin: http://jsbin.com/eneru I am trying to
I put this in my JavaScript, and introduced a 500 error in my $.ajax,
Hi i am a newbie to php and am following this tutorial http://tutorialpot.com/2011/06/fancy-contact-form-with-inline-validation/#comment-1771 i
I'm writing an entry submission controller by this tutorial: http://www.communityguides.eu/articles/1 When I try to
First, this could look like duplicate for How to prevent your JavaScript code from
I put this at the top, using sudo vi /etc/profile: PYTHONPATH=/home/myuser:/home/myotheruser When I use
When I put this code in <asp:LoginStatus ID=LoginStatus1 runat=server style=top: 170px; left: 890px; position:
how to put this code below? - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { NSString *year
It's hard to put this into the title, so let me explain. I have
I'm trying to put this data type in a Haskell Set, but I don't

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.