Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to escape an ampersand or &sec in url

Posted on 2006-11-09
3
Medium Priority
?
5,481 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 2000 total points
ID: 17906923
0
 
LVL 30

Expert Comment

by:Mark Steggles
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:Mark Steggles
ID: 17907034
just replace all & with &amp;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

722 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