inherit
254180
0
Apr 13, 2018 8:24:11 GMT -8
Chris Iverson
6
April 2018
chrisiverson
|
Post by Chris Iverson on Apr 6, 2018 9:04:49 GMT -8
Forum URL: libertybasiccom.proboards.comWe're having trouble with posting code written by our members. We've noticed that the code tag seems to not preserve whitespace. The whitespace is saved in the message itself, and the preview looks fine, but when it's actually on the live topic page, all extra whitespace has been stripped, so not even editing CSS can get it back. Wrapping the code tag in a pre tag does preserve the whitespace, but I would've thought that the code tag itself would do so, since a large amount of code is indented to specific levels. Am I missing something? Is there a way to just get code tags to preserve the whitespace?
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Apr 6, 2018 9:13:54 GMT -8
Hi, Chris Iverson . <code> tags have white-space: pre-wrap as one of their CSS properties by default so they shouldn't be losing white space. $(function(){ // Test // Test // Test }); At what point is the white space being stripped for you?
|
|
inherit
254180
0
Apr 13, 2018 8:24:11 GMT -8
Chris Iverson
6
April 2018
chrisiverson
|
Post by Chris Iverson on Apr 6, 2018 9:26:19 GMT -8
This is what I see for your post: This is what I see if I quote your post: This is the HTML code for the block in the post: This is the HTML code for the quoted block in the preview editor: The extra whitespace is simply gone in the live post. The style on the HTML <code> tag is preserving the whitespace; the problem is, the page isn't receiving any whitespace to preserve!
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Apr 6, 2018 9:46:53 GMT -8
|
|
inherit
254180
0
Apr 13, 2018 8:24:11 GMT -8
Chris Iverson
6
April 2018
chrisiverson
|
Post by Chris Iverson on Apr 6, 2018 10:24:13 GMT -8
What the... that just makes this stranger.
How about on mobile, over a cell data connection? Or on the site testing page browserling.com?
I only ask because every device in every location I try shows the same results, regardless of device, browser, connection, ISP, etc, and my users are all reporting the same results.
There's a difference somewhere, and now I'm very curious as to what it is.
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Apr 6, 2018 10:42:42 GMT -8
It's probably something to do with the fact that I'm at the ProBoards office versus on a regular connection. I don't doubt that there's a difference between what the server sends me versus what it sends you.
Unfortunately that also means that you'll have to stick to using [pre] tags for the time being as the solution.
|
|
inherit
254180
0
Apr 13, 2018 8:24:11 GMT -8
Chris Iverson
6
April 2018
chrisiverson
|
Post by Chris Iverson on Apr 6, 2018 12:05:32 GMT -8
Ok, I hope that gets looked at eventually, though. Oh, more information that makes this even weirder: this seems to only happen to me on boards created on the *.proboards.com domain. I set up a few test boards to test styling and plugin building features to create a work around for the code/pre tags without ruining a community board, and the code blocks work and appear fine for the boards I set up on *.boards.net and *.freeforums.net. The one I created on *.proboards.com has the whitespace stripped in code tags. All the public facing code and styles I believe are identical, and I would've expected the same code to be running on the back-end for each domain, as well, just hosted on different servers(if that, considering the possibility of virtualization.) For comparison: Boards.net: arcaneanomaly.boards.net/thread/1/welcome-new-forumFreeForums.net: arcaneanomaly.freeforums.net/thread/1/welcome-new-forum ProBoards.com: arcaneanomaly.proboards.com/thread/1/welcome-new-forumThere's a post in each of those topics after the first one, that has text in code tags. For the ones on boards.net and freeforums.net, I see the post properly indented. For the version hosted on proboards.com, I see the whitespace stripped as above.
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Apr 6, 2018 14:08:32 GMT -8
Thanks, Chris Iverson. I went ahead and made a task for this based off of the fact that it was only happening on one domain and it got fixed shortly after, as shown in my initial post in this thread which no longer presents the issue. It looks like this was due to a CloudFlare setting applied specifically to the ProBoards.com domain. This would also explain why I wasn't able to duplicate it on the office connection since I think we may have different CloudFlare rules for our connection due to the developer environments.
|
|
inherit
254180
0
Apr 13, 2018 8:24:11 GMT -8
Chris Iverson
6
April 2018
chrisiverson
|
Post by Chris Iverson on Apr 6, 2018 14:21:28 GMT -8
Excellent! Thank you very much!
And I'm guessing that, if you're in the office, on the same local network as the server that hosts ProBoards, your internal DNS would just bypass CloudFlare completely, since going through CF would likely just slow you down, as well as possibly block access to dev pages, depending on how you have your prod and QA environments locked down.
Thanks again! You guys are awesome!
|
|
#e61919
2
0
1
Mar 22, 2024 12:10:09 GMT -8
Martyn Dale
$[user.personal_text]
20,088
February 2003
martyn
|
Post by Martyn Dale on Apr 6, 2018 15:04:39 GMT -8
Excellent! Thank you very much! Not a problem =D As for the next part, you're verrry close! We're not literally on the same local network, but it is VPN'd so it does appear as such to most (Though that can easily be argued is just semantics with networking these days) Spot on there Surprisingly thats not typically the case connectivity wise. Their having a PoP a few ms upstream on both ends of the equation typically does result in there being no slowdown, even for us. Deployment wise, it certainly has been an issue (see next). Funnily enough its almost the other way around. CF tends to pick up our deployment bots as bots (fancy that) and blocks them. The bigger one is resource testing and their CDN. Responses from the cache have confused our poor bots in the past. In terms of environment access, they actually have a new product for that which essentially blurs the lines between internet and intranet, using authentication from numerous sources as possibilities. Many cool possibilities with that. Thank you as well, it was your noting the difference between the different domains which had me immediately guess the nature of the issue when this crossed my desk Have a great weekend!
|
|
aaw
New Member
Posts: 14
inherit
254154
0
Nov 2, 2018 7:24:22 GMT -8
aaw
14
April 2018
aaw
|
Post by aaw on Apr 7, 2018 2:44:51 GMT -8
I'm an admin at this board and we are all very grateful to the support staff here and to Chris Iverson. A coding forum needs to have the ability to display formatted code, so this was important to us. Thank you very much! Our post of gratitude.
|
|