htmlentities mi trasforma
&#8217 in &amp#8217
quindi non mi sembra la funzione corretta...

Mi sa proprio che non esiste