React – dangerouslySetInnerHTML being displayed as plain text

I’ve created a React app that displays job postings. When I click on a job post in the list, that particular job post’s details are displayed.

I’m trying to display the body of the job post in the same way that it has been formatted at the source. To do that, I’ve tried using the following code:

<div id="apply-now" className="apply-section">
    <h3>How to apply.</h3>
    <div dangerouslySetInnerHTML={{ __html: currentJob.description }}></div>

However, when the component is rendered, the content is not formatted and is displayed in plain text without the appropriate formatting.

Here’s an example that hasn’t been formatted:


The word __"Application"__ should be in bold, the website link should be an actual link, as should "Click here for an application form" link.

The data I’m getting back from the API call is the same as above:

Join us! – We are looking forward to your application via the "Application" form Your contact: Ralph Ullmann Telefon: 089/ 5511 333783 Click here for the application form!"

^^ Even above on StackOverflow it works! But I can’t get it to work in my app!

I’ve been tearing my hair out for hours trying to fix this and I can’t even understand why it doesn’t work.

1,680 thoughts on “React – dangerouslySetInnerHTML being displayed as plain text”

  1. Pingback: cialis 100mg uk
  2. Pingback: cialis 50mg pills
  3. Pingback: free viagra
  4. Pingback: viagra meaning
  5. [url=]where can you buy cheap viagra[/url] [url=]ivermectin 200mg[/url] [url=]sildenafil 50mg for sale[/url] [url=]cost of 50mg furosemide tablets[/url] [url=]tadalafil 5mg online canada[/url]

  6. Pingback: what is sildenafil
  7. Pingback: tadalafil 5mg
  8. Pingback: levitra 20mg india
  9. [url=]generic tadalafil 5mg price[/url] [url=]super viagra[/url] [url=]cialis 5mg daily buy online[/url] [url=]discount cialis prices[/url] [url=]no prescription cheap viagra[/url] [url=]buy cialis from canada[/url] [url=]cialis generic online uk[/url]

  10. [url=]generic cialis uk[/url] [url=]how to buy cialis in usa[/url] [url=]save on pharmacy[/url]

  11. [url=]buying sildenafil uk[/url] [url=]usa viagra 4000 mg[/url] [url=]metformin 1000 mg for sale[/url] [url=]viagra 50 mg for sale[/url] [url=]clomid clomiphene[/url]

  12. Pingback: lasix medication
  13. Pingback: xenical cost nz
  14. [url=]lexapro 100mg[/url] [url=]canadian drug pharmacy cialis[/url] [url=]tadalafil citrate[/url] [url=]10mg cialis for daily use[/url] [url=]india tadalafil[/url] [url=]viagra where to buy canada[/url] [url=]tadalafil capsules[/url] [url=]buy cheap kamagra oral jelly[/url] [url=]ivermectin 0.08%[/url] [url=]generic viagra medication[/url]

  15. [url=]sildenafil 20 mg online pharmacy[/url] [url=]online cialis usa[/url] [url=]tadalafil online us[/url] [url=]stromectol buy[/url] [url=]tadalafil 5 mg tablet coupon[/url] [url=]cheap generic viagra 25mg[/url] [url=]lisinopril 20 25 mg[/url] [url=]buy tadalafil 5mg online[/url] [url=]doxycycline order uk[/url] [url=]where to buy clomid online uk[/url]

  16. [url=]buy cialis 5mg canada[/url] [url=]brand name propecia online[/url] [url=]plaquenil cost[/url] [url=]sildenafil 20 mg tablets price[/url]

  17. [url=]sildenafil tablets online[/url] [url=]cialis prescription online[/url] [url=]buy cheap generic cialis online[/url] [url=]tadalafil uk paypal[/url] [url=]where to get cheap viagra[/url] [url=]lexapro 20 mg cost[/url] [url=]cialis 20 mg[/url] [url=]ivermectin 2%[/url] [url=]generic viagra uk[/url] [url=]pharmaceuticals online australia[/url]

  18. [url=]medicine plaquenil 200 mg[/url] [url=]generic cialis 100mg[/url] [url=]cialis gel online[/url]

  19. Pingback: naltrexone libido
  20. Pingback: rx tizanidine hcl
  21. Pingback: cialis for sell
  22. Pingback: cialis black
  23. Pingback: viagra in canada
  24. Pingback: herbal viagra
  25. I’ve been surfing online more than 3 hours today,
    yet I never found any interesting article
    like yours. It is pretty worth enough for me. In my view, if all
    web owners and bloggers made good content as you did, the
    internet will be a lot more useful than ever before.

  26. Hi there! Someone in my Myspace group shared this site with us so I came to take a look.
    I’m definitely loving the information. I’m bookmarking and will be
    tweeting this to my followers! Terrific blog and terrific design.

  27. I’ve been browsing online more than 3 hours nowadays, but I by no means found any interesting article
    like yours. It is beautiful value enough for me.
    In my opinion, if all web owners and bloggers made good content as you probably did,
    the web shall be a lot more helpful than ever before.

  28. Aw, this was a really nice post. Taking a few minutes
    and actual effort to create a very good article… but what can I
    say… I hesitate a whole lot and never manage to get anything done.