php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67545 htmlentities is not working
Submitted: 2014-06-30 11:25 UTC Modified: 2014-06-30 14:44 UTC
From: benedict dot poppe at neuberger dot net Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.5.14 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: benedict dot poppe at neuberger dot net
New email:
PHP Version: OS:

 

 [2014-06-30 11:25 UTC] benedict dot poppe at neuberger dot net
Description:
------------
I have an webspace account with PHP 5.5 on www.hetzner.de.

If i use the function "htmlentities", define a variable with htmlcode and commit the var as function- parameter, nothing happens.

I start error_reporting, but no errors are displayed. 

If i use the htmlentities function twice on an var, i see the correct output. 
I tested it with different character sets and flags.

See my testscript.

The problem appears on an local linux ubuntu server with PHP Version 5.3.2-1ubuntu4.25

and on my webspace account with PHP Version 5.5

Test script:
---------------
This Example -->> doesn't <<-- work on my system: 

$str = "A 'quote' is <b>bold</b>";

// Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities($str);



This Example -->> work <<-- on my system: 


$str = "A 'quote' is <b>bold</b>";

// Outputs: A 'quote' is &lt;b&gt;bold&lt;/b&gt;
echo htmlentities(htmlentities($str));





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-30 14:44 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 [2014-06-30 14:44 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

User your browser's "view source" feature (Ctrl+U) or a command line PHP to see what happens.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 02:01:24 2020 UTC