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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC