Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use a href tag within a custom tag  RSS feed

Anjali Naveen
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a custom tag which has to render a link. Im using a href for rendering the link

String str ="a href="+actionName+"?method="+methodName+"&productId="+productId+"&productName=" + productName+">"+ productName+"</a>";

The product id and name is retrieved from the data base
The link works fine except that if the product name consists of spaces, the spaces dont get passed through the request
Eg: If the product name is 'Photo Frame' just Photo gets displayed on the next page
How do i ensure that the spaces are escaped within the string
Plz help
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!