How to use single quote and double quote in the middle of the sentence without escaping

How to use single quote and double quote in the middle of the sentence without escaping?
For eg : Please start typing your address in the “Street” field and select from the list of suggestions.
When we use double quotes in the middle of the sentence in a yml file, it doesn’t work, it just only shows the half the sentence (Please start typing your address in the) in the browser.
how can this be done

Put > in for YAML value and then write the full value on the next line:

This has to be done with

$ head 2016/2016-09-08-Ubuntu-fails-to-^Suspend^.md

---
layout:       post
title:        >
    Ubuntu fails to "Suspend"
site:         Ask Ubuntu
stack_url:    https://askubuntu.com/q/822337
type:         Answer
tags:         14.04 suspend
created_date: 2016-09-08 01:34:48
edit_date:    2020-02-08 18:37:04
votes:        "2 "
favorites:    
views:        "1,418 "
accepted:     
uploaded:     2022-01-23 11:36:46
git_md_url:   https://github.com/pippim/pippim.github.io/blob/main/_posts/2016/2016-09-08-Ubuntu-fails-to-^Suspend^.md
toc:          false
navigation:   false
clipboard:    false
---

HTH

1 Like

it didn’t work for me in a sentence
This key I have added in the yml file:
address_tooltip: Please start typing your address in the Street field and select from the list of suggestions. If your address doesn’t appear in the list, please manually enter it and we’ll do our best to get your order to you.

In the above sentence i need to add double quotes in the middle for this text “Street”

my_key: |
  Single's and "doubles"

Note indentation

You can use > or | for different effect

Please link to your file on GH please

My suggestion was to do it like this:

address_tooltip: >
    Please start typing your address in the "Street" field and select from the list of suggestions. If your address doesn’t appear in the list, please manually enter it and we’ll do our best to get your order to you.

Note the > character after the key and how the text starts on the next line.

Let me know if this works.

Thank you, we have tried what you instructed but still we face the same problem

@sharon I think now the problem now lies in the code that uses the yaml string. Can you post the tooltip code?

Sure @pippim


          <div class="form-group required">
            <label for="shippingaddress" class="control-label"
            >{% t order.shipping_address %}</label
            >          
            <a
                target="_blank"
                data-toggle="tooltip"
                data-placement="right"
                style="text-decoration: none;"
                title="{% t order.address_tooltip %}"
                >
                <i class="fa fa-info-circle" aria-hidden="true" style="font-size: 20px;">
                </i></a
            >

@sharon Can you try it without the “t” (translation) liquid filter?

If you need to keep the t filter you could change the " to html code:

"Street"

becomes:

&quot;street&quot;

`If you need to keep the t filter you could change the " to html code:

“Street”
becomes:

"street" `

@pippim Thank you, this is working

@sharon You’re welcome.