HAML - what does the “!=” operator do?

前端 未结 3 1762
说谎
说谎 2021-01-23 10:51

I am looking at some seemlingly standard Haml code right now, but just noticed it starts off with a \"!=\", and 5 minutes of googling has failed to give me the answer for what

3条回答
  •  情话喂你
    2021-01-23 11:28

    Same as using = but doesn't sanitize the HTML

    See http://haml.info/docs/yardoc/file.REFERENCE.html#unescaping_html

    != "Look  !"
    

    compiles to

    Look !
    

    instead of

    Look <g;up>
    

提交回复
热议问题