php - Do I need to format a twitter status before outputing it to a web page? -
php - Do I need to format a twitter status before outputing it to a web page? - so, looking @ how other web pages have sorted out, , found http://www.phppennyauctiondemo.com/ (below auctions, there's twitter updates part). they format twitter statuses next way before outputing web page: <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"> ... var status = twitters[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url) { homecoming '<a href="'+url+'">'+url+'</a>'; }).replace(/\b@([_a-z0-9]+)/ig, function(reply) { homecoming reply.charat(0)+'<a href="http://twitter.com/'+reply.substring(1)+'">'+reply.substring(1)+'</a>'; }); ... </script> my question is: why? , do? also, should aswell? until now, i've used twitters[i].text. without formating...