简体   繁体   中英

Issue on view page source of HTML tag data

I have rendering some data from my express to ejs as HTMl tag format. It is showing properly in the ejs template page and web page. But when i am searching for page source it is encoded to unescape. Is there any solution where I can get the same HTML tag data in my page source.

Actual Data : Cleaning Services in Palm Jumeirah, Dubai - Suit your needs & Budget\\n\\nHelpsters cleaning services is a professional provider of high quality cleaning services across Palm Jumeirah, Dubai. We have quickly become Dubai' s preferred cleaning service , with over 1000 happy customers served to date, it's easy to see why cus tomers stick with Helpsters when ordering weekly, or monthly cleanings.

\\n\\n

  • Special Prices for Regular Customers.
  • \\ n
  • Special Weekly and Monthly Packages.
  • \\n
  • Enjoy trustworthy and hassle-free cleaning, everytime and anytime.
  • \\n
  • \\n
  • Profession al Filipino Cleaners.
  • \\n
  • Easy Online Booking & 24/7 Customer Service .
  • \\n\\nWhether it is a luxury apa rtment, a residential or an office space in Palm Jumeirah, Dubai, we are able to meet your cleaning needs. We are de dicated to leaving every home or office squeaky clean every time! Forget the hassles of keeping your property clean and maintaining a full time cleaning staff. Just book our cleaning services in Palm Jumeirah , Dubai & we will take care of rest.

    We also do < strong>house cleaning, office cleaning , carpet c leaning and deep cleaning .

    \\n

    In view page source its converted to unescape of this html.

    For escaping the value correctly use <%= data[0].description%>

    If you want to allow HTML to be rendered, then you want an "unescaped" value. To do that use the following: <%- data[0].description%>

    All I did was replace the equal (=) with a dash (-).

    The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM