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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:13:10+00:00 2026-05-26T04:13:10+00:00

For some reason, I am getting additional code in my encoded URI’s with javascript

  • 0

For some reason, I am getting additional code in my encoded URI’s with javascript encodeURIcomponent function, namely %25 character:

My function is:

function twit_click() {
    var u="https://www.website.com/<?php echo $_SESSION['id'];?>";
    var t="sometext";
    window.open('http://www.twitter.com/share?url='+encodeURIComponent(u)+'&text='+encodeURIComponent(t),'twitsharer','toolbar=0,status=0,width=626,height=436');
    return false;   
}

when I click the text and call twit_click() function, I get the following URL:

http://twitter.com/intent/tweet?text=sometext&url=https%253A%252F%252Fwww.website.com%252Fuserid

as opposed to what it should be:

http://twitter.com/intent/tweet?text=sometext&url=https%3A%2F%2Fwww.website.com%2Fuserid

am I missing something? It is adding in additional “25” characters which would imply I have % in my URI which I clearly do not.

  • 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-26T04:13:10+00:00Added an answer on May 26, 2026 at 4:13 am

    Remove the “www” from “www.twitter” and it works.

    http://jsfiddle.net/tzkpz/

    Twitter must be re-encoding the URL when it redirects from http://www.twitter.com to twitter.com, hence the double encoding.

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

Sidebar

Related Questions

For some reason I'm not getting this. (Example model below) If I write: var
I have a problem with getting my pager-function to work. For some reason it
hi im trying to using flashVars however for some reason there not getting sent
I'm writing a program in C++ and for some reason I'm getting a segmentation
I have just tried using the NSArchiver but for some reason I am getting
For some reason I am having trouble getting my head around __init__ and __new__
I'm getting undefined for some reason when I try to return the html via
this Android code worked fine before, but i'm having problems for some reason. here
For some reason I'm getting a Trace/BPT trap error when calling urllib.urlopen . I've
I'm using an ObjectDataSource to perform CRUD operations. For some reason I am getting

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.