PHP Classes

Errors found

Recommend this page to a friend!

      PHP HtmlEntities Encoding and Decoding  >  All threads  >  Errors found  >  (Un) Subscribe thread alerts  
Subject:Errors found
Summary:Tilde does not translate and characters are dropped
Messages:4
Author:Gerry Danen
Date:2016-04-26 15:25:32
 

  1. Errors found   Reply   Report abuse  
Picture of Gerry Danen Gerry Danen - 2016-04-26 15:25:32
I tried this as a test:

$to_encode = "~ * ( # - , ; : - Hi, this is Gerry!<br>";
$encoded = $formatter->encode($to_encode);
echo 'Encoded: ' . $encoded . '<br>';

The tilde is not translated.

When I use this:

echo 'Decoded: ';
echo $formatter->decode('&amp;tilde; &amp;ast; &amp;lpar; &amp;num; &amp;hyphen; &amp;comma; &amp;semi; &amp;colon; &amp;hyphen; Hi&amp;comma; this is Gerry&amp;excl;&amp;lt;br&amp;gt;');

All letters in the alphabet are dropped.

  2. Re: Errors found   Reply   Report abuse  
Picture of Gavin Gordon Markowski Gavin Gordon Markowski - 2016-04-27 08:58:50 - In reply to message 1 from Gerry Danen
Omg, I'm embarrassed.

I apologize for this, and i'll start working on a fix as soon as possible. Once that is done, I will inform you.

  3. Issue Resolved   Reply   Report abuse  
Picture of Gavin Gordon Markowski Gavin Gordon Markowski - 2016-04-28 22:39:18 - In reply to message 1 from Gerry Danen
Hello, Gerry.

I believe I have resolved the issues you had encountered.

I have uploaded the files here, as well as on github ( https://github.com/gavinggordon/htmlentities ), and I tested all the files via phpunit; the test results passed successfully.

Please don't hesitate to let me know if the problem still persists, or if you encounter anymore issues.

Thank you!

Sincerely,
Gavin

  4. Re: Errors found - Resolved   Reply   Report abuse  
Picture of Gavin Gordon Markowski Gavin Gordon Markowski - 2016-05-04 18:37:42 - In reply to message 1 from Gerry Danen
Hey, Gerry.

I can confirm with you 100% now, after some further testing, that I have resolved the issue you were facing, regarding the inability to encode/decode the tilde sign.

Thank you for your feedback!

By the way, I have been nominated for a PHP Innovation Award for HtmlEntities. To show your support, please feel free to submit your vote for this class at http://www.phpclasses.org/vote.html. Once there, select the radio button to the left where my info is location on that page (you will see my name [Gavin Gordon Markowski]). Then, scroll down to the bottom of that page, and click submit. :-D

Sincerely,
Gavin