Jump to content

[SOLVED] html char %0D


jaymc

Recommended Posts

I have a text document which i use php to strip data from

 

One stage it strips someones name, however, there name contains a hidden character and after further investigation ive found it to be the html eqivelent of

 

%0D

 

Which is apparently a line feed

 

How can I use PHP to strip it out. Please note that its not actually displayed as THERENAME%0D

 

But I know its there

 

Thanks.

Link to comment
Share on other sites

Because it doesnt show up as %0D in notepad or when echoing it

 

I only found it out when it was displayed in the browser and I noticed that char appearing at the end

 

Its like an invisible character anywhere else apart from in an address bar

 

Or if its in notepad it will just insert a new line. I suppose its like \n

 

How the hell can i get rid ofr this its driving me crazy

 

 

Link to comment
Share on other sites

That doesnt work

 

Its not physically visible when echoed out or even in a database

 

Its like a hidden char which only has relivence in a browser URL or as a line break

 

Therefor doin an str_replace or ereg_replace wont detect it

Link to comment
Share on other sites

Guest prozente

It's not a linefeed, it's a carriage return, in PHP it's \r

 

Use str_replace

 

So you'd put for "\r" to be replaced with '' which would be nothing

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.