[SOLVED] Diffusion not showing text spacing correctly by default


Hey Guys,

Been running a phabricator install for the past few months and all is going well, except for one issue.

When viewing source code through Diffusion, the text spacing is wrong until I ‘View As Source’ or change the highlighting or encoding manually. After that the source code appears fine.

Before you do that, all the text is pushed to the left like there is no spacing at all. Any ideas on how I can fix this?


Compare that with https://secure.phabricator.com

Thanks in Advance,


I have been looking through the source code of Phabricator to try and find whats causing this issue, however I’m not sure where exactly to look. At this point I think its a bug.


Do you maybe have some strange proxy/webserver that modifies the HTML/css before sending?
Looks like it’s just a bunch of spaces, and white-space: pre-wrap in a css.


I don’t think so, is there a way to check? I run NGINX behind CloudFlare and haven’t had this issue before with Wordpress or other software.

EDIT: Took a look at my NGINX configs and I’m not appearing to be modifying any HTML/CSS.


It seems to be working fine when viewing as remarkup - the spacing is kept when you refresh the page. However when viewing as source, as hexdump or a JSON, the spacing gets all chomped.

Also the same thing happens in settings for JSON based configs.



Looks like CloudFlare might be able to modify your HTML.

Also check for any browser extensions you might have installed.


Ah! You’re right. CloudFlares auto-minification was the cause of this issue - specifically the HTML minification. Can’t believe I didn’t think of this earlier.

I created a page rule to disable all minification for my sub domain.

Thank you for pointing this out to me.

closed #8