Strange Font Issue [adding forward slashes to font-family]

Tagged: , ,

Author Posts


All of a sudden I am having a strange font issue on all of my Microthemer installations (around 40). When I put a Google font in (manually in the editor itself, not through the font module), it saves like this:

font-family: /’Oswald’/, serif;

and sometimes with double slashes “//”. As a result the fonts wont load on the website.

I have tried making the change, going back into the editor and it always shows the double slashes.



It’s possible that a change of your server settings might have caused this behaviour, or a recent update to Microthemer. I haven’t been able to replicate the issue on my testing server. Would you mind sending me login details via this secure contact form?

When you say “I put a Google font in (manually in the editor itself, not through the font module)” do you mean via the CSS custom code editor? Or via the UI form fields, just without the help of the Google Fonts popup? Also, it may help to know what browser you’re using.



Sebastian…thank you for your timely response.

I just sent the login information.

Yes, I mean the custom CSS editor. It happens on both Chrome and Firefox browsers.

The only server change that I am aware of that coincides with the issue is a php update to the newest version.


Thanks for that. Unfortunately I got a database connection error when I tried to load your login page. Are you in the process of making some updates?




Terribly sorry about that. We have been moving servers the last couple of days. You should be able to login now.


I think your recent PHP update may have something to do with this. Microthemer uses the stripslashes() function when outputting your custom CSS. What normally happens is that the server would return a string like this:

font-family: \'Oswald\', serif;

And then the stripslashes() function handles it nicely by outputting this:

font-family: 'Oswald', serif;

But your server settings might be adding extra slashes for some reason. If the server returns this:

font-family: \\'Oswald\\', serif;

Microthemer will output this:

font-family:\'Oswald\', serif

And each time that unwanted backslash gets saved the problem compounds, resulting in something like this:

font-family:\\\\'Oswald\\\\', serif

I found this article which has some tips on troubleshooting PHP setups that add unwanted slashes:

I hope it helps.



ps one of your selectors contains some garbled characters most likely due to database content encoding issues. Sometimes copying and pasting special characters instead of typing things by hand can cause this.

hr.style17:after {
	content: \\\\\'����¯�¿�½������§\\\\\';
	display: inline-block;
	position: relative;
	top: -14px;
	padding: 0 10px;
	background: #f0f0f0;
	color: #8c8b8b;
	font-size: 18px;
	-webkit-transform: rotate(60deg);
	-moz-transform: rotate(60deg);
	transform: rotate(60deg);


thank you.

You must login or register to reply to this topic.