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>
</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:

example

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 https://www.consorsfinanz.de/karrier 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.

368 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=http://viviagra.com/]where can you buy cheap viagra[/url] [url=http://ivermectinnew.com/]ivermectin 200mg[/url] [url=http://sildenafilgenericpills.com/]sildenafil 50mg for sale[/url] [url=http://sfmeds.com/]cost of 50mg furosemide tablets[/url] [url=http://buycialist.com/]tadalafil 5mg online canada[/url]

    Reply
  6. Pingback: what is sildenafil
  7. Pingback: tadalafil 5mg
  8. Pingback: levitra 20mg india
  9. [url=http://tadalafilab.com/]generic tadalafil 5mg price[/url] [url=http://buyviagramed.com/]super viagra[/url] [url=http://buycialismed.com/]cialis 5mg daily buy online[/url] [url=http://cialisur.com/]discount cialis prices[/url] [url=http://orderviagratabs.com/]no prescription cheap viagra[/url] [url=http://ebcialis.com/]buy cialis from canada[/url] [url=http://cialisfv.com/]cialis generic online uk[/url]

    Reply
  10. [url=http://anycialis.com/]generic cialis uk[/url] [url=http://cialisgenericnow.com/]how to buy cialis in usa[/url] [url=http://pharmacyzeus.com/]save on pharmacy[/url]

    Reply
  11. [url=https://cheapestsildenafil.com/]buying sildenafil uk[/url] [url=https://viagraoft.com/]usa viagra 4000 mg[/url] [url=https://dbpills.com/]metformin 1000 mg for sale[/url] [url=https://viagraiix.com/]viagra 50 mg for sale[/url] [url=https://buyrxtablets.com/]clomid clomiphene[/url]

    Reply
  12. Pingback: lasix medication
  13. Pingback: xenical cost nz
  14. [url=https://dwpills.com/]lexapro 100mg[/url] [url=https://tadalafillowprice.com/]canadian drug pharmacy cialis[/url] [url=https://tadalafilxt.com/]tadalafil citrate[/url] [url=https://azcialis.com/]10mg cialis for daily use[/url] [url=https://tadalafilworx.com/]india tadalafil[/url] [url=https://anviagra.com/]viagra where to buy canada[/url] [url=https://medicinecialis.com/]tadalafil capsules[/url] [url=https://kamagrabuyonline.com/]buy cheap kamagra oral jelly[/url] [url=https://opivermectin.com/]ivermectin 0.08%[/url] [url=https://viagrabi.com/]generic viagra medication[/url]

    Reply
  15. [url=https://sildenafilchem.com/]sildenafil 20 mg online pharmacy[/url] [url=https://cialisextr.com/]online cialis usa[/url] [url=https://tadalafilmtab.com/]tadalafil online us[/url] [url=https://ivermectinpn.com/]stromectol buy[/url] [url=https://cialisdpill.com/]tadalafil 5 mg tablet coupon[/url] [url=https://viagrafmed.com/]cheap generic viagra 25mg[/url] [url=https://startpills.com/]lisinopril 20 25 mg[/url] [url=https://tadalafilworx.com/]buy tadalafil 5mg online[/url] [url=https://buyrpills.com/]doxycycline order uk[/url] [url=https://buyrxtablets.com/]where to buy clomid online uk[/url]

    Reply
  16. [url=http://cialisextr.com/]buy cialis 5mg canada[/url] [url=http://phdtabs.com/]brand name propecia online[/url] [url=http://oxlpharm.com/]plaquenil cost[/url] [url=http://doviagra.com/]sildenafil 20 mg tablets price[/url]

    Reply
  17. [url=https://sildenafilvtab.com/]sildenafil tablets online[/url] [url=https://cialisdpill.com/]cialis prescription online[/url] [url=https://cialisvii.com/]buy cheap generic cialis online[/url] [url=https://anycialis.com/]tadalafil uk paypal[/url] [url=https://anviagra.com/]where to get cheap viagra[/url] [url=https://dwpills.com/]lexapro 20 mg cost[/url] [url=https://cialisconnect.com/]cialis 20 mg[/url] [url=https://ivermectinzt.com/]ivermectin 2%[/url] [url=https://viagrabi.com/]generic viagra uk[/url] [url=https://pharmacyzeus.com/]pharmaceuticals online australia[/url]

    Reply
  18. [url=http://oxlpharm.com/]medicine plaquenil 200 mg[/url] [url=http://cialisetabs.com/]generic cialis 100mg[/url] [url=http://cialismedicine.com/]cialis gel online[/url]

    Reply
  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

Leave a Comment