How to escape apostrophe in app.yml

I would like to use a single quote character in the title of my forum to achieve Pilot's Lounge. When I specified it in the UI, it worked fine. However, when I try setting the variable DISCOURSE_TITLE variable in app.yml to Pilot's Lounge, the title is truncated at the single quote.
I’ve had a look at YAML Ain't Markup Language (YAML) Version 1.1, but using '' (two consecutive single quotes) doesn’t work.
I’ve also tried "Pilot's Lounge", "Pilot''s Lounge", and other variations but none work.

How is this done?

Try:

  DISCOURSE_TITLE: "Pilot\'s Lounge"
2 Likes

Unfortunately that generates an error:

(<unknown>): found unknown escape character while parsing a quoted scalar at line 69 column 20 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

Here are all that I’ve tried thus far:

DISCOURSE_TITLE: "Pilot\'s Lounge"      <==  GENERATES an ERROR
DISCOURSE_TITLE: 'Pilot\'s Lounge'      <==  GENERATES an ERROR
DISCOURSE_TITLE: Pilot\'s Lounge        <==  Slash escape
DISCOURSE_TITLE: "Pilot's Lounge"       <==  Surrounding Double quote, single apostrophe
DISCOURSE_TITLE: "Pilot''s Lounge"      <==  Surrounding Double quote, double apostrophe
DISCOURSE_TITLE: Pilot''s Lounge        <==  double apostrophe
DISCOURSE_TITLE: 'Pilot''s Lounge'      <==  Surrounding single quotes, double apostrophe
DISCOURSE_TITLE: 'Pilot's Lounge'       <==  GENERATES an ERROR
3 Likes

Wow that is a comprehensive list. I’m surprised one of those did not work!

2 Likes

Yes, and I can’t think of any other forms to try.
I’ll come back to this once I’ve had a break.

1 Like

Did you try an apostrophe instead of the typewriter apostrophe ' ? I’ve used this in the app.yml previously to set a site title.

Wrap the title in quotes " " and it works fine.

5 Likes

@Stephen : I’ll try that. I’ll copy/paste the character from your post into my file.

1 Like

I just tried it again on a test site and it worked fine, should resolve your issue.

1 Like

lol. I’m still rebuilding my site.
Yes, that worked. :partying_face:
The wrapping quotes weren’t required.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.