1
0

Blockquote bug in PatNet


               
2016 Oct 25, 9:46am   1,985 views  14 comments

by Dan8267   follow (4)  

@Patrick

The blockquote tag is ignored if it is the first text in a post. For example a post of "<blockquote>yada yada yada</blockquote>" will not be block quoted whereas a post of "...<blockquote>yada yada yada<blockquote>" will be.

#misc #rechargableBatteriesDumbass

Comments 1 - 14 of 14        Search these comments

1   Dan8267   2016 Oct 25, 9:46am  

Example not working

2   Dan8267   2016 Oct 25, 9:46am  

...

Example working

3   Dan8267   2016 Oct 25, 9:47am  

Select and quote examples to see their HTML.

4   Patrick   2016 Oct 25, 9:52am  

Yes, I just noticed that myself. Added to the list of things to fix.

Or you could fix it if you have some time! https://github.com/killelea/patrick.net

5   Dan8267   2017 Jan 18, 8:16pm  

This is still a problem.

6   Patrick   2017 Jan 18, 8:39pm  

Still no idea why it's a problem, but my css foo is weak.

7   Dan8267   2017 Jan 18, 8:53pm  

rando says

Still no idea why it's a problem, but my css foo is weak.

It's not a CSS problem. It's a malformed tag. Specifically PatNet is creating a div open tag without the ending bracket. This causes the blockquote tag to be absorbed.

Looking at the source of this page, there's a part that goes

The missing right angle bracket for the div tag before the blockquote tag causes browsers to interpret the div tag as having an unrecognized blockquote attribute rather than containing a blockquote tag.

This problem also happens with blockquote tags further down in a comment, but the symptom of the problem goes away because the errant div tag absorbs a p tag instead of the div tag.

This problem is likely caused by a typo in a PHP file for generating server-side DHTML. However, I have not taken the time to look through the source code to confirm this.

8   Patrick   2017 Jan 18, 9:00pm  

Holy fuck you're right! There was a missing end to a div tag. I put it in and that seems to have fixed it. Thanks!

Let me know if you still see the initial-blockquote problem.

9   Dan8267   2017 Jan 18, 9:06pm  

rando says

Holy fuck you're right!

If I had a dollar for every time someone said that, I could pay off the national debt.

10   Dan8267   2017 Jan 18, 9:08pm  

Test: This should be blockquoted

If the problem is fixed, all prior comments should be working fine. It appears to not be fixed yet.

11   Dan8267   2017 Jan 18, 9:10pm  

If I could find the file you are using to generate the HTML for comments in a thread, including the part that goes "Really delete?" then I could probably tell you what to change.

12   Dan8267   2017 Jan 18, 9:22pm  

Line 2408 of functions.php
https://github.com/killelea/patrick.net/blob/93c4f8006c52973eba3f8ef4d40ef4abcd1a7c0f/html/functions.php#L2408

The code looks right. Perhaps this version isn't deployed to PatNet.

Well, except why are there two ending div tags and only one opening one?

13   Patrick   2017 Jan 18, 10:03pm  

this

Ah, failed to deploy the fix before. Now initial blockquote works.

The two end div tags are an ugly side effect of a previous open div.

14   Dan8267   2017 Jan 18, 10:10pm  

Confirmed. Fixed.

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   users   suggestions   gaiste