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 #184792 is a reply to message #184789] Sat, 01 February 2014 19:26 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
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)

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[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: Wed Nov 27 12:00:57 GMT 2024

Total time taken to generate the page: 0.04996 seconds