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

  • Home
  • SEARCH
  • 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 239407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:34:58+00:00 2026-05-11T20:34:58+00:00

I have a Javascript bookmarklet that, when clicked on, redirects the user to a

  • 0

I have a Javascript bookmarklet that, when clicked on, redirects the user to a new webpage and supplies the URL of the old webpage as a parameter in the query string.

I’m running into a problem when the original webpage has a double hyphen in the URL (ex. page--1--of--3.html). Stupid, I know – I can’t control the original page The javascript escape function I’m using does not escape the hyphen, and IIS 6 gives a file not found error if asked to serve resource.aspx?original=page--1--of--3.html

Is there an alternative javascript escape function I can use? What is the best way to solve this problem? Does anybody know why IIS chokes on resource.aspx?original=page--1 and not page-1?

  • 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-11T20:34:58+00:00Added an answer on May 11, 2026 at 8:34 pm

    Can you expand the escape function with some custom logic to encode the hypen’s manually?

    resource.aspx?original=page%2d%2d1%2d%2dof%2d%2d3.html
    

    Something like this:

    function customEscape(url) {
        url = escape(url);
        url = url.replace(/-/g, '%2d');
        return url;
    }
    
    location.href = customEscape("resource.axd?original=test--page.html");  
    

    Update, for a bookmarklet:

    <a href="javascript:location.href=escape('resource.axd?original=test--page.html').replace(/-/g, '%2d')">Link</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a javascript like this, used i a bookmarklet: window.location=URL document.getElementById('username-id').value = 'User'
I have JavaScript that is doing activity periodically. When the user is not looking
I have javascript string variable with var sttr=We prefer questions that can be answered
I have a JavaScript bookmarklet that I'd like fans of a certain page to
I have a bookmarklet that needs to open a new window/tab. In order to
I've developed a JavaScript Bookmarklet that have appended div to the current page. But
Ok, I have a simple javascript function in a bookmarklet that finds all of
I have a little bookmarklet that opens up a new window, only problem is,
I have a JavaScript bookmarklet that is working fine in Chrome (v21) and Safari
I have the following javascript bookmarklet which opens a new popup window with a

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.