rockinaway Posted October 23, 2008 Share Posted October 23, 2008 I want to shop the link code i.e. with the <a href= blah blah blah, but whenever I put it into the file it parses and shows as a URL. How can I prevent it from doing this and leave it just as text? Link to comment https://forums.phpfreaks.com/topic/129791-stop-link-from-parsing/ Share on other sites More sharing options...
CroNiX Posted October 23, 2008 Share Posted October 23, 2008 You can use javascript for this: <a href="#" onclick="this.href='http://www.google.com';">click me</a> I think this is what you are wanting to do... So when you hover over the link it displays '#' but when you click on it it goes to the url in the onclick event. Link to comment https://forums.phpfreaks.com/topic/129791-stop-link-from-parsing/#findComment-672877 Share on other sites More sharing options...
rockinaway Posted October 23, 2008 Author Share Posted October 23, 2008 No.. I just want to show the text i.e <a href = "http://www.adminfuel.com">Link</a> At the moment, if I put that, it just shows Link as a link. But I want that exact code to show so the user can copy it. Link to comment https://forums.phpfreaks.com/topic/129791-stop-link-from-parsing/#findComment-672885 Share on other sites More sharing options...
wildteen88 Posted October 23, 2008 Share Posted October 23, 2008 To stop HTML being parsed then use htmlentities() or htmlspecialchars() Link to comment https://forums.phpfreaks.com/topic/129791-stop-link-from-parsing/#findComment-672889 Share on other sites More sharing options...
rockinaway Posted October 23, 2008 Author Share Posted October 23, 2008 Done the job.. Link to comment https://forums.phpfreaks.com/topic/129791-stop-link-from-parsing/#findComment-672891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.