Solved

how to escape an ampersand or &sec in url

Posted on 2006-11-09
3
5,425 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now