2

Closed

Using multiple Google fonts in one link results in server errror

description

The usage of Google fonts only works when using one font per Style.Include. Using multiple fonts, separated by a vertical line | (usage provided like this by Google) results in a server error. The vertical line is causing the error. As soon as it's removed, the code works fine (obviously the fonts are not included then).

Code
Style.Include("http://fonts.googleapis.com/css?family=Poiret+One|PT+Serif");
Error
'http:/fonts.googleapis.com/css' is not a valid virtual path.
The error occurs in ResourceManager.cs in function FixPath, line 42. It seems the VirtualPathUtility.ToAbsolute() doesn't handle the vertical line very well.

file attachments

Closed Apr 9, 2013 at 8:11 PM by sebastienros
You should encode the | into %7C when defining the url.

comments