Grav: Apostrophes in site.yaml description causes 500 error

Created on 14 Sep 2014  路  3Comments  路  Source: getgrav/grav

Happens across all themes. Having an apostrophe in the description field of the site.yaml causes a 500 error.

question

Most helpful comment

I suspect you are not escaping the apostrophe in the yaml that is already enclosed by apostrophes:

ie:

description: 'Grav Site's Description'

The error by default is hidden by Grav, but you can see it by looking in the /logs folder.

There are three solutions:

a) Escape the apostrophe like so: description: 'Grav Site''s Description'

or

b) Use double quotes around the string: description: "Grav Site's Description"

or

c) Use no quotes at all: description: Grav Site's Description

All 3 comments

Thanks will investigate this further.

I suspect you are not escaping the apostrophe in the yaml that is already enclosed by apostrophes:

ie:

description: 'Grav Site's Description'

The error by default is hidden by Grav, but you can see it by looking in the /logs folder.

There are three solutions:

a) Escape the apostrophe like so: description: 'Grav Site''s Description'

or

b) Use double quotes around the string: description: "Grav Site's Description"

or

c) Use no quotes at all: description: Grav Site's Description

Awesome, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carstenwm picture carstenwm  路  3Comments

vico93 picture vico93  路  5Comments

tdulieu picture tdulieu  路  3Comments

flaviocopes picture flaviocopes  路  5Comments

matroidde picture matroidde  路  3Comments