html-entity-decode

How to add html_entity_decode to array?

I am making a content entry with TinyMCE in codeigniter. However the output source is like the following and does not show < and >. Instead it shows HTML enties like and etc. The entry is made by admin after logged in. Output comes from database. I took out escape in model, but it still does the same thing. Also I have a config ...

PHP html_entity_decode and HTML <a> tag

I am trying to use MediaWiki's API to get articles in XML format and include them on my page. I created a simple code which basically gets the XML representation of an article using ?action=parse&page=Page_Name&format=xml requests. The code is following: if($_GET["page"]=='') die("Page not specified (possibly direct call)"); $pagename...

php htmlentities to decode textarea

Hi, I have a text area and I would like to take the input of the text area and merge it all together. Everything works fine except that it's escaping the quotes. For example test's is outputted as test/'s To fix this I tried htmlenttries such as, <?php $inputtext= $_POST['textinput']; $encodetext = htmlentities($inputtext); ...

PHP Substr Function Trimming Problem

Hi, I'm using below code for triming titles and show it recent posts section on my blog: <?php global $post; $releaseDate = get_post_meta($post->ID, "gosterim_tarihi", true); foreach( $images as $image ) { $title = get_the_title(); if (strlen($title) > 20) { $title = substr($title, 0, 20) . '&hellip;'; } $attachmentimage=wp...

Decoding mysql_real_escape_string() for outputting HTML

I'm trying to protect myself from sql injection and am using: mysql_real_escape_string($string); When posting HTML it looks something like this: <span class="\&quot;className\&quot;"> <p class="\&quot;pClass\&quot;" id="\&quot;pId\&quot;"></p> </span> I'm not sure how many other variations real_escape_string adds so don't want to j...

[PHP] Can't remove special characters with str_replace

Hi, I have a very trivial problem with str_replace. I have a string with the En Dash character ( - ) like this: I want to remove - the dash The html output is I want to remove the &ndash; the dash I want to do this: $new_string = str_replace ('-','',$string); I've tried to parse the string with html_entity_decode, to parse the ...

javascript equivalent of html_entity_decode that doesn't rely on innerHTML?

I'm looking for a javascript version of PHP's html_entity_decode. I found this: function html_entity_decode(str){ var tarea=document.createElement('textarea'); tarea.innerHTML = str; return tarea.value; tarea.parentNode.removeChild(tarea); } However, I can't use this because I need to write this code for an FBML/FBJS Facebook canva...

PHP html decoding help - converting: A &#039;quote&#039; is <b>bold</b>

I need to convert a string like this: A &#039;quote&#039; is <b>bold</b> into: A 'quote' is <b>bold</b> html_entity_decode() did not work. ...

PHP: Converting utf8 chars from mysql db

I have a longtext in my db where i have some special chars like &Atilde; How i can convert it to "à"? I've tried using utf8_encode and _decode but it seems not work. Document charset is utf8, and longtext field too. ...