FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Writing double-prime to file?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Writing double-prime to file? [message #184796 is a reply to message #184792] Sun, 02 February 2014 18:33 Go to previous messageGo to previous message
adrian is currently offline  adrian
Messages: 27
Registered: December 2012
Karma:
Junior Member
Denis McMahon <denismfmcmahon(at)gmail(dot)com> wrote:

> On Sat, 01 Feb 2014 18:00:30 +0000, Adrian Tuddenham wrote:
>
>> I did not think I was outputting the variable to HTML, the handler for
>> that code is written in PHP (although it does generate some HTML, but
>> the problem occurs before that bit).
>
> Regardless of how the data gets there, you're placing the string contents
> of the variable concerned in the value attribute of an input element in
> an html document.
>
> The attributes of the html input element are probably defined as follows:
>
> <input type="hidden" name="something" value="something">
>
> The web browser only receives and processes html, so if you write the
> string
>
> The quick brown "fox" jumps over the lazy dog
>
> into the value field, then the html parser in the web browser sees:
>
> <input type="hidden" name="something" value="The quick brown "fox" jumps
> over the lazy dog">
>
> It parses this into the following:
>
> An input element
>
> with type attribute of value "hidden"
>
> and name attribute of value "something"
>
> and value attribute of value "The quick brown "
>
> and fox attribute of value true (which it may treat as garbage
> and discard)
>
> and a string of " jumps over the lazy dog" (which it probably
> treats as garbage and discards)

Thanks. This solves the puzzle, although it does raise the question of
how the same string got through the previous POST without this
happening. Now I know what I am looking for. I'll have a better chance
of sorting it out.


--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Phonegap upload issue with PHP server
Next Topic: RE: Seeeking Windows PHP IDE for USB Stick
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 16:00:45 GMT 2024

Total time taken to generate the page: 0.05177 seconds