Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

165
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda