Solved

how to escape an ampersand or &sec in url

Posted on 2006-11-09
3
5,457 Views
Last Modified: 2007-12-19
Hi,

I have the following URL which I'm entering into a database.

<a href="http://orient.bowdoin.edu/orient/article.php?date=2006-11-10§ion=3&id=1">http://orient.bowdoin.edu/orient/article.php?date=2006-11-10§ion=3&id=1</a>

The URL goes to the right page but the link displays on the website with a strange S character instead of &sec in the word section.  I realize &sec is the HTML code for the strange S character.  How do I escape the &sec in the URL so it reads correctly instead of displaying the S?

Thanks,
Katrina
0
Comment
Question by:katrina_mc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 17906923
0
 
LVL 30

Expert Comment

by:Steggs
ID: 17907022
Greetings Katrina,

You need to escape the &'s by using &amp;

So, your link should be

<a href="http://orient.bowdoin.edu/orient/article.php?date=2006-11-10&section=3&id=1">http://orient.bowdoin.edu/orient/article.php?date=2006-11-10&section=3&id=1</a>

Regards
0
 
LVL 30

Expert Comment

by:Steggs
ID: 17907034
just replace all & with &amp;
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question