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

176
Vistas
Get encoded content from javascript object and display it on pug, how?

I got an XML which contained tag <content:encoded> which I have processed to this form. There are several tag and I am currently struggle at this particular tag. Example :

{
  title: [
    'the title goes here'
  ],
  link: [
    'https://anotherlink.com'
  ],
  description: [
    '<img src="https://something.com/foo.jpg"/>Some words here'
  ],
  'content:encoded': [
    'This content is what I want to get, also with escaped characters included'
  ],
  guid: [
    'https://something.com'
  ]
}

my pug page:

extends mp

block layout-content
  div.View
    h1.Banner Hello!
    data_in
    ul
      each element in data_in
          li
            div.Message
              div.Title
                h1= element.title                  >this gets expected output
                h3= element.content|encoded        >this gets wrong output

How do I get that encoded content , while with the same code do well when I getting the 'title' attribute ? Do I have to do another iteration ? Thank you

*edit : I mean , 'title' value

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