Escaping single and double quotes in a string in ruby?

前端 未结 9 843
忘了有多久
忘了有多久 2020-12-05 09:33

How can I escape single and double quotes in a string?

I want to escape single and double quotes together. I know how to pass them separately but don\'t know how to

9条回答
  •  既然无缘
    2020-12-05 09:44

    Here is an example of how to use %Q[] in a more complex scenario:

      %Q[
        
        
      ].html_safe
    

提交回复
热议问题