I have a problem with a link, which generates from GoCardless PHP library.
I'm using WordPress and I've found that the file /wp-includes/formatting.php
have a function "ent2ncr"
, which replaces "×"
with multiplication sign "×"
and in some magical way, this function ( may be I'm wrong ) changes ...×tamp=2017-08-24T12%3A26%3A34Z
to ...×tamp=2017-08-24T12%3A26%3A34Z
I can't change a name of this parameter, because it is required by GoCarldess API.
P.S. I've tried to comment this line in formatting.php
, but nothing changes.
Whats happening is the × part of ×tamp is being translated as x
as a result you end up with xtamp
Try encoding the &
in front of timestamp
with &
edited: to say encoding not escaping
I had ever meet a question with ×(×) and then fixed below by use htmlentities
$str = $node->getAttribute('href');
echo $str;//output http://mp.weixin.qq.com/profile?
src=3×tamp=1524825376&ver=1
echo htmlentities($str);
here is the output
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With