Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Cannot make a new line using <br /> html

I have a problem breaking down 1 line using <br />, I have converted to string but it doesn't work. I have followed this https://stackoverflow.com/questions/63574937/how-to-convert-html-string-into-plain-text-in-react answer to follow edit, it still doesn't work.

This intl.formatMessage({ id: "AUTH.LOGIN.DESCRIPTION.1" }) is System may takes some time to generate the email. Kindly login when you had received the email. <br /> Thank you for your understanding and apologise for the inconvenience caused.


const htmlFormatMessage = intl.formatMessage({ id: "AUTH.LOGIN.DESCRIPTION.1" });
const htmlString = htmlFormatMessage;
const plainString = htmlString.replace(/<br\/>/gi, '\n');

<p className="text-muted font-weight-bold">
   {plainString}
</p>

Now my result is shown below:

img1

I want the actual result to be shown below:

img2

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!