Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Apple/Safari user inserting unwanted Carriage Returns (int..

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Related Topics:
no carriage returns (TJJAY) - i need to have H1 - H6 entries on my web page but without the carriage returns that follow these. i use a css external file to format my web site. is there an easy fix for me here? does anyone have a great example? tia btw, my draft page..

inserting a blog - hi i have a website. i'd like to a blog...so the users can share ideas and on the topic of the site. i'm not much of a just use Frontpage to build and maintain my site. now how would I a blog? ..

.htaccess causing unwanted 403 error - I have been using .htaccess to prevent of images from my site and it works well. However, I am switching to a new host (a dedicated server) and when I upload the file in the httpdocs directory (named /html) I get a 403 error trying to access..

Anyone wants to sell me his unwanted domain name cheap ? P.. - Anyone wants to sell me his unwanted domain name cheap ? Please email me.

Using Frames in Safari - Hi All I know the first thing that some might say is that I shouldn't be using in frames in web sites, but they are listed as being part of the HTML 4.0 standard. I am trying to do my web sites without them, but I have a couple that really need to have.
Next:  Webmaster: AJAX? question  
Author Message
ship

External


Since: Aug 22, 2005
Posts: 129



(Msg. 1) Posted: Thu May 04, 2006 6:57 am
Post subject: Apple/Safari user inserting unwanted Carriage Returns (into single line fields)
Archived from groups: alt>www>webmaster, others (more info?)

Hi

We have the problem that Apple/Safari user seem to be able to somehow
insert
Carriage Returns into single line fields.

Has anyone else had this problem?
Any idea what they are doing & how we can stop the problem?!

With thanks


Ship
Shiperton Henethe

 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
SpaceGirl

External


Since: Aug 04, 2005
Posts: 246



(Msg. 2) Posted: Thu May 04, 2006 7:07 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ship wrote:
> Hi
>
> We have the problem that Apple/Safari user seem to be able to somehow
> insert
> Carriage Returns into single line fields.
>
> Has anyone else had this problem?
> Any idea what they are doing & how we can stop the problem?!
>
> With thanks
>
>
> Ship
> Shiperton Henethe

Hmm. Maybe the users are doing a copy & paste into your input field?
Just in case, make sure you strip the carriage return characters at
your server.

In ASP:

checkthisstring = request("formfield")
checkthisstring = replace(checkthisstring, chr(13), "")
checkthisstring = replace(checkthisstring, chr(10), "")

....

 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
SpaceGirl

External


Since: Aug 04, 2005
Posts: 246



(Msg. 3) Posted: Thu May 04, 2006 7:43 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Brian Wakem wrote:
> ship wrote:
> > Hi
> >
> > We have the problem that Apple/Safari user seem to be able to somehow
> > insert
> > Carriage Returns into single line fields.
> >
> > Has anyone else had this problem?
> > Any idea what they are doing & how we can stop the problem?!
> >
> > With thanks
> >
> >
> > Ship
> > Shiperton Henethe
> >
>
>
>
> Anyone can submit anything they like for any field.
>

Well.. not without a hack. Unless you hack the users input form, how
would you submit, say, a DVD video into a radio button? Smile
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
ship

External


Since: Aug 22, 2005
Posts: 129



(Msg. 4) Posted: Thu May 04, 2006 7:49 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes most likely it's a multi-paste that causes the problem -
though we cant duplicate the problem on our Apple running Safari!

This is only happening in an address-capturing field.

But does this mean that if we want our reports to work correctly
(i.e. single line fields need to result in single lines in reports)
then we need to specifically remove all breaks from all data ever being
caputured?

Ship
Shiperton Henethe
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
oeb

External


Since: Nov 30, 2005
Posts: 10



(Msg. 5) Posted: Thu May 04, 2006 4:15 pm
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

SpaceGirl wrote:
> Brian Wakem wrote:
>> ship wrote:
>>> Hi
>>>
>>> We have the problem that Apple/Safari user seem to be able to somehow
>>> insert
>>> Carriage Returns into single line fields.
>>>
>>> Has anyone else had this problem?
>>> Any idea what they are doing & how we can stop the problem?!
>>>
>>> With thanks
>>>
>>>
>>> Ship
>>> Shiperton Henethe
>>>
>>
>>
>> Anyone can submit anything they like for any field.
>>
>
> Well.. not without a hack. Unless you hack the users input form, how
> would you submit, say, a DVD video into a radio button? Smile
>

Send the binary as post information with the same name as the form field.
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
John Chambers

External


Since: Feb 16, 2006
Posts: 2



(Msg. 6) Posted: Thu May 04, 2006 9:35 pm
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

SpaceGirl wrote:
> Brian Wakem wrote:

>> Anyone can submit anything they like for any field.

> Well.. not without a hack. Unless you hack the users input form, how
> would you submit, say, a DVD video into a radio button? Smile

This is a bit of a misuse of the term "hack". Any C, perl, python or PHP
programmer has easy access to web runtime libraries that allow the
submission of form info from a program. There are very good reasons
for doing this. A bit of software can be millions of times cheaper and
faster than hiring a human to sit at a computer and laboriously fill in
zillions of web forms. So people (like me Wink get hired to write a program
to do the job. If a site is only accessible via the web, that's what you do.

A program that submits a web form to a server can (and often does, at
least in early releases) send any sort of garbage for any form field.

There's also the problem of a form that gets changed without warning,
and a program fills in the fields in a way that would have been correct
for the earlier version. This is an ongoing headache, but it's really not
much different than any of the traditional ways of miscommunication
that we humans have worked out in the past.

None of this really qualifies as hackery. It's just software development.
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
Barry Margolin

External


Since: May 05, 2006
Posts: 1



(Msg. 7) Posted: Fri May 05, 2006 12:09 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <ALydnVVG-rmWVcfZ4p2dnA DeleteThis @speakeasy.net>,
John Chambers <jcsd DeleteThis @speakeasy.net> wrote:

> SpaceGirl wrote:
> > Brian Wakem wrote:
>
> >> Anyone can submit anything they like for any field.
>
> > Well.. not without a hack. Unless you hack the users input form, how
> > would you submit, say, a DVD video into a radio button? Smile
>
> This is a bit of a misuse of the term "hack".

But if someone does it intentionally, especially with the intent to
confuse the script that processes the form input, it's a hack.

--
Barry Margolin, barmar DeleteThis @alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
shiphen

External


Since: May 05, 2006
Posts: 1



(Msg. 8) Posted: Fri May 05, 2006 6:13 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi theSpaceGirl (miranda)

Are you recommending that we all to ALL this pre-processing on ALL
fields of ALL forms, then?!

Out of interest have you actually come across people submitting
SQL commands ?!

And if so doesnt this lead to rather clumbsy slow data-capture forms?
....or do you still think it is it worth it in any case?


Ship
Shiperton Henethe
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
SpaceGirl

External


Since: Aug 04, 2005
Posts: 246



(Msg. 9) Posted: Fri May 05, 2006 7:51 am
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

shiphen wrote:
> Hi theSpaceGirl (miranda)
>
> Are you recommending that we all to ALL this pre-processing on ALL
> fields of ALL forms, then?!

Yep, without a doubt. If you dont, it's just asking for trouble --
especially when it's really simple to do.

>
> Out of interest have you actually come across people submitting
> SQL commands ?!
>

Yep

> And if so doesnt this lead to rather clumbsy slow data-capture forms?
> ...or do you still think it is it worth it in any case?

It's not as complicated as it sounds - you can write a single function
that is run to clean-up each form field before you deal with it. The
function only needs to written once, and then you can run that function
against each field.

Okay here's a chunk of ASP psuedo-code that would handle the form
fields:

' CODE
function processFields(userInput)
userInput=replace(userInput,"<", "")
userInput=replace(userInput,"'", "")
userInput=replace(userInput,"""", "")
userInput=replace(userInput,chr(13), "")
userInput=replace(userInput,chr(10), "")
userInput=replace(userInput,"swearword", "")
'... add as many replacements as you like
processFields = userInput
end function

' END CODE

So, then we can just process each field:

'CODE
username=processFields(request("username_field_from_form"))
password=processFields(request("password_field_from_form"))
city=processFields(request("city_field_from_form"))
'END CODE

So, it's really simple to process hundreds of fields instantly "pre"
validating them, stripping any hacks or bad data. This is of course all
possible in any language you true, and all runs at the server not the
client so CANNOT be bypassed by a user (or hacker!).

Hope that helps!
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
Bill

External


Since: May 05, 2006
Posts: 1



(Msg. 10) Posted: Fri May 05, 2006 4:31 pm
Post subject: Re: Apple/Safari user inserting unwanted Carriage Returns (into single line fiel [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ship wrote:
> Hi
>
> We have the problem that Apple/Safari user seem to be able to somehow
> insert
> Carriage Returns into single line fields.
>
> Has anyone else had this problem?
> Any idea what they are doing & how we can stop the problem?!
>
> With thanks
>
>
> Ship
> Shiperton Henethe

I suspect this is related to the way that Safari handles tables --
different than Firefox, Netscape and IE. The last three named browsers
will hold a table in tact (only one CR at the end of line) so that it
can be pasted, for example, into Excel as a table. Safari throws in a
CR after every field.

I complained to Apple about this a couple of years ago. The longer
they wait to get compatible with the other browsers, the bigger the
hassle....

Bill
 >> Stay informed about: Apple/Safari user inserting unwanted Carriage Returns (int.. 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]