Wez Furlong wrote:
> Well, if the general opinion is that there *should* be such a
> function included in PHP, around a week or so ago I implemented
> a version that uses the multiple charset aware tables that are
> already in html.c.
>
> But the voting was -0 (Derick) and +1 (Yasuo).
> Personall
Well, if the general opinion is that there *should* be such a
function included in PHP, around a week or so ago I implemented
a version that uses the multiple charset aware tables that are
already in html.c.
But the voting was -0 (Derick) and +1 (Yasuo).
Personally, I'm +0 since I have written th
On Wed, Feb 27, 2002 at 11:07:29AM +0100, Derick Rethans wrote :
> I've to agree wtih Rasmus here, IMO it does not warrant a new function.
But don't you lost focus a bit? This is not exactly a
counterpart to a function. It also adds new functionality.
- Markus
--
PHP Development M
> > Yeah, but I believe both of you are _not_ agaist for having this,
> > right? Having reverse order conversion function is nice when it is
> > possbile to write one even if it is relatively easy to write. IMO.
>
> Ok, let me put it in a more blunt way then: I'm against adding
> more bloat to
On Wed, 27 Feb 2002, Yasuo Ohgaki wrote:
> Derick Rethans wrote:
> > Hello,
> >
> > I've to agree wtih Rasmus here, IMO it does not warrant a new function.
> >
> > Derick
>
> Yeah, but I believe both of you are _not_ agaist for having this,
> right? Having reverse order conversion function is nic
Derick Rethans wrote:
> Hello,
>
> I've to agree wtih Rasmus here, IMO it does not warrant a new function.
>
> Derick
Yeah, but I believe both of you are _not_ agaist for having this,
right? Having reverse order conversion function is nice when it is
possbile to write one even if it is relative
Hello,
I've to agree wtih Rasmus here, IMO it does not warrant a new function.
Derick
On Tue, 26 Feb 2002, Rasmus Lerdorf wrote:
> Reversing htmlentities is trivial. I don't think it needs a special
> function.
>
> Simply do:
>
> $trans = get_html_translation_table(HTML_ENTITIES);
> $tra
Here are the diffs for the unhtmlentities function. Also included is a test
script for some rudimentary benchmarking.
-Brad
unhtmlentities_test.php
Description: application/unknown-content-type-microsoft
--- html.c Tue Feb 26 22:44:44 2002
+++ html.c Wed Feb 27 00:42:04 2002
@@ -1
No, not an exact reverse, but a function which could take arbitrary
input with HTML entities in it and convert that input to a normal
string. The input would not neccesarily need to come from the
htmlentities function. It could come from any arbitrary HTML code,
including hand-coded or generate
But then we are not talking about the reverse of htmlentities because
htmlentities() would never create
On Tue, 26 Feb 2002, Brad Fisher wrote:
> Not as trivial as you make it seem...
>
> - Consider the following code: -
>
>$data = "This is & some text";
>$trans = get
At 09:37 PM 2/26/2002 -0600, Brad Fisher wrote:
>I have looked at the following:
> http://www.php.net/anoncvs.php
> http://cvs.php.net/cvs.php
>
>I am rather new to CVS, so perhaps this is a stupid question... I don't see
>the HEAD branch anywhere... Can I check it out through anon CVS
Not as trivial as you make it seem...
- Consider the following code: -
$data = "This is & some text";
$trans = get_html_translation_table(HTML_ENTITIES);
$trans = array_flip($trans);
$data2 = strtr($data,$trans);
echo "Original data is:\n";
echo "$data\n\n";
Rasmus Lerdorf wrote:
> Reversing htmlentities is trivial. I don't think it needs a special
> function.
>
> Simply do:
>
> $trans = get_html_translation_table(HTML_ENTITIES);
> $trans = array_flip($trans);
> $data = strtr($data,$trans);
>
> -Rasmus
I agree it's easy.
I prefer to have i
Reversing htmlentities is trivial. I don't think it needs a special
function.
Simply do:
$trans = get_html_translation_table(HTML_ENTITIES);
$trans = array_flip($trans);
$data = strtr($data,$trans);
-Rasmus
On Tue, 26 Feb 2002, Brad Fisher wrote:
>
> I have looked at the following:
>
I have looked at the following:
http://www.php.net/anoncvs.php
http://cvs.php.net/cvs.php
I am rather new to CVS, so perhaps this is a stupid question... I don't see
the HEAD branch anywhere... Can I check it out through anon CVS or would I
need dev access? Or is this a reference to p
Quick fix
Brad Fisher wrote:
> PHPAPI char* php_str_unhtmlentities(char *str, unsigned int *resultlen)
PHPAPI char* php_str_unhtmlentities(char *str, unsigned int *resultlen
TSRMLS_DC)
Use memcpy instead of strcpy/strncpy. strcpy() won't work when user uses
UCS-4 or like.
>
> /* BF 6/11/0
Brad Fisher wrote:
> Just another function I have found useful.. PHP has a htmlentities
> function, but no unhtmlentities function to go the other direction.. (At
> least not that I am aware of). So, here you go. Don't think this one
> would perform nearly as quickly if it were done using rege
17 matches
Mail list logo