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

167
Views
How to add CSS to sanitized text?

I am working with a web project where I have full control on the "client web page" (I can add or modify HTML / CSS / JS)

The content management system is, however, not under our control. That CMS exposes one text box where I can input some description text that will be displayed on client web page but does html sanitization which remove all html tags. This prevent me from styling my text field.

Basically

<h2 class="red-text">Some Text I Wanna Style</h2>

Become just Some Text I Wanna Style I trust that there is some way around this as I have full access to the client side which means I can implement my own "markup system" like BBCode?

[b]bolded text[/b]

Where I can find the tag and use JS to transform it to appropriate CSS class.

My question is that: Am I approaching this issue the correct way? Is there any standard/common method/library to solve this kind of problem?

Edit: I do not have access to the server side, only the client side

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you're only using light markup, then try using Markdown! Its ridiculously popular and has a million libraries in every language conceivable (most of all JS).

Almost certainly the easiest thing to use, given the simplicity of the libraries that exist for it. If its suitable for this project, I highly recommend it :)

I imagine that some libraries support extending the syntax with your own, custom rules too!

about 4 years ago · Juan Pablo Isaza Report
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!