Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Escape < character in java string

Posted on 2017-10-12
Medium Priority
Last Modified: 2017-10-20
Hi All we have a string in our selenium tests which we we want to appear as a link in the report we are generating for example <a href=\"{link}\">{link}</a>. The probably is when the html report is generated it converts the < symbol to ;lt; and > to ;gt;. Is there a way we can try and prevent this occurring so the link appears correctly in the report
Question by:victoriaharry
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
LVL 60

Expert Comment

ID: 42329433
use %3C for <

try this online service


to encode characters...
LVL 60

Expert Comment

ID: 42329435
or maybe you should escape them too like

<a href=\"{link}\">{link}</a>

Open in new window


\<a href=\"{link}\">{link}\</a>

Open in new window

not sure where the conversion gets messed up...
LVL 86

Expert Comment

Please post an example extract. You can change the actual urls to something ordinary and public

Expert Comment

by:Craig Kehler
How are you generating your reports? Have you tried ReportNG with TestNG?

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

618 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