I don't know if this is possible but I have a piece of plain text which always includes:
http://www.royalmail/portal/etc/etc/track.php?trackNumber=123345323 When dragged to my page from the database this obviously does not render as a link. Is there any way to select this piece of text (ie via the http://) and at the most basic wrap it with anchor tags - or more complexly - retrieve the address, wrap the address with anchor tags, and change the original http:// text to something more understandable such as 'Track Parcel'
It should be noted that there could be numerous tracking references looped out at once.
My containing HTML is as follows
<div class="message_holder"> <div class="mess_head" style="width:110px;"> <p><strong>Sender: </strong><? echo $row11['sender'];?></p> </div> <div class="mess_head" style="width:450px;"> <p><strong>Subject: </strong><span class="red"><? echo $row11['subject'];?></span></p> </div> <div class="mess_head" style="width:150px;"> <p><strong>Date Sent: </strong><? echo date('d/m/Y, H.ia', $row11['date_sent']);?></p> </div> <div class="mess_head" style="width:200px;"> <p><strong>Message ID: </strong><? echo $row11['message_id'];?></p> </div> <div class="mess_body"> <p><? echo html_entity_decode($row11['message']);?></p> </div> </div> The plain text links will all show up in the 'mess_body' class. I have tried using html_entity_decode() but this did not do the trick. If there is an easy way to do this via PHP rather than JQuery it could be simpler.
<a href="<? echo html_entity_decode($row11['message']);?>">Track Parcel</a>?