2

I edit a Wiki page, which uses Courier New here and there, but when I save the page and view it, the font isn't saved (though the text is). The same problem seems to occur for any font. Other formatting, such as bold, italics and styles is fine.

This problem occurs in Chrome 7.0.517.44, and not in IE 8 or Firefox, and we are still on FogBugz 8.1.1.

When switching to HTML view, the markup looks about right:

<span style="font-family: 'Courier New', Courier, monospace; ">some text</span>

But after saving, the custom font still vanishes, and editing the html now shows this:

<span>some text</span>

I tried changing it to a different element (<strong>), but it seems that, when saving the document, the style attribute is always lost.

I also tried this with an on-demand account running FogBugz 8.1.5H and the problem is still there.

EDIT: All the fonts I tried earlier had spaces in their name. It turns out that fonts without spaces are fine, because only the spaced fonts get single-quotes in Chrome (see my answer for the explanation).

flag

2 Answers

2

I figured out the difference between the browsers. It's in the styles they choose:

  • Chrome: <span style="font-family: 'Courier New', Courier, monospace; ">
  • IE 8: <span style="font-family: courier new, courier, monospace">
  • Firefox: <span style="font-family: Courier New,Courier,monospace;">

I'm guessing that Chrome's single-quotes around Courier New are causing some kind of grief, since I can make the style save correctly by manually removing the single-quotes.

This is clearly a bug, probably in the way FogBugz handles CKEditor's output, since the single-quotes are perfectly legal. In fact, they are required by CSS. This problem is common to every desktop WebKit browser I have (Chrome on Win 7, Linux and Mac OS X, and Safari on Mac OS X).

link|flag
1 
Great bug report! I wish everyone on my team was this diligent. – cdeszaq Nov 30 2010 at 14:04
1

The Wiki editor in FogBugz is a heavily themed version of the CK Editor which does much of it's font magic through liberal use of span tags. One thing you could to to help determine where the problem is would be to click the Edit HTML Source button (last one on the right) and look to see if the HTML being generated by the editor will apply the font you are looking for.

Also, what version of Chrome is having the problem? I also use Chrome to do the same things and have not noticed this problem.

Finally, this is definitely the place to ask questions and post bugs. Contacting Fog Creek directly is never a bad idea, but by posting here you are helping others as well.

link|flag
Thanks for the pointers, @cdeszaq. I've amended my question in response. – Marcelo Cantos Nov 30 2010 at 0:12

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.