Closed Bug 291533 Opened 20 years ago Closed 20 years ago

Missing a quote when I use addslashes in php and view source

Categories

(Toolkit :: View Source, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: nathan, Assigned: bugs)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

By viewing the source of an html document containing the following code, I miss
several trailing slashes at the closing of each tag. For example, (... bold:\>
is the result, when I should get (... bold:\">).



Firefox output:
sa fdasd&nbsp;&nbsp; <span style="font-weight: bold;">asfdasfasf</span><br>

After:&nbsp;asdf asdf as <span style=\"font-weight: bold;\>dfasd </span><br>
asdf<br>

as <span style=\"font-weight: bold;\>asdf </span>asfa s as <span
style=\"font-style: italic;\>dfasfda </span>s<br>

fd<br>
as <br>
sa f<br>
<br>
&nbsp; <br>
asd f<br>

sa fdasd&nbsp;&nbsp; <span style=\"font-weight: bold;\>asfdasfasf</span>

Reproducible: Always

Steps to Reproduce:
1. Save this code to an html file

Example code:
sa fdasd&nbsp;&nbsp; <span style="font-weight: bold;">asfdasfasf</span><br>

After:&nbsp;asdf asdf as <span style=\"font-weight: bold;\">dfasd </span><br>
asdf<br>
as <span style=\"font-weight: bold;\">asdf </span>asfa s as <span
style=\"font-style: italic;\">dfasfda </span>s<br>

fd<br>
as <br>
sa f<br>
<br>
&nbsp; <br>
asd f<br>
sa fdasd&nbsp;&nbsp; <span style=\"font-weight: bold;\">asfdasfasf</span>

2. View source

Actual Results:  
sa fdasd&nbsp;&nbsp; <span style="font-weight: bold;">asfdasfasf</span><br>

After:&nbsp;asdf asdf as <span style=\"font-weight: bold;\>dfasd </span><br>
asdf<br>

as <span style=\"font-weight: bold;\>asdf </span>asfa s as <span
style=\"font-style: italic;\>dfasfda </span>s<br>

fd<br>
as <br>
sa f<br>
<br>
&nbsp; <br>
asd f<br>

sa fdasd&nbsp;&nbsp; <span style=\"font-weight: bold;\>asfdasfasf</span>

Expected Results:  
sa fdasd&nbsp;&nbsp; <span style="font-weight: bold;">asfdasfasf</span><br>

After:&nbsp;asdf asdf as <span style=\"font-weight: bold;\">dfasd </span><br>
asdf<br>
as <span style=\"font-weight: bold;\">asdf </span>asfa s as <span
style=\"font-style: italic;\">dfasfda </span>s<br>

fd<br>
as <br>
sa f<br>
<br>
&nbsp; <br>
asd f<br>
sa fdasd&nbsp;&nbsp; <span style=\"font-weight: bold;\">asfdasfasf</span>
please attach the file instead.
Severity: critical → normal
Confirmed 1.0.2 is also affected. Originally confirmed with 1.0.3
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050419
Firefox/1.0+

Please retest with a recent build from
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

Not that the markup makes much sense to me.
Doesn't work for me with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0

probably fixed on trunk.
WFM with a recent trunk build, and if it didn't, I'd probably say it's INVALID.

Firefox 1.1 will have the fix.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
As I do development with PHP, I came across this while using a
print_r(addslashes($var)) on a variable then viewing the source of the document
to find out what was going on.

Testing on trunk myself.
Confirmed, works in latest 1.0+
marking verified.
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: