javascript - Facebook profile link stored in MySQL doesn't work when returned to HTML -
i have stored following code in mysql text field:
'<img class="marginright roundpicture" src="'+pictureurl+'"/><a href="'+link+'" target="_blank" />'+name+'</a>' using ajax $.post in jquery. pictureurl, link , name variables javascript. store code in mysql database.
when return code mysql using ajax , update table it, pictureurl link works, link in <a> tag doesn't. links this:
pictureurl = https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xat1/v/t1.0...
link = https://www.facebook.com/app_scoped_user_id/163665554...
i put ... @ end because long display here.
if copy link code , access manually in browser works, reasons doesn't work when updating code automatically in page.
it string when comes database. in order display correctly, need convert html format using html_entity_decode().
Comments
Post a Comment