Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

373
Visualizações
Why isn't <br> displayed as break line in html?

I am using a flask to make requests and display results in html page in my browser:

@api.route('/matcher', methods=['GET'])
def matcher():
    mid = request.args.get('id')
    text = get_text(id)
    parameter_data = {'enable': ['matcher']}
    result_dict = nlu.get_result(text, **parameter_data)

    return jsonify(result_dict)

The function get_result returns a dict, something as below:

{
"text": "This is a test",
"log": "log1 <br>log2<br>log3<br>",
"tags": {
"primary_tags": [],
"aux_tags": [],
 }
}

I hope the
tag in the filed 'log' will function as a break line when I make a request in my browser, but it seems it isn't interpreted as a html tag 'break line'. There is no break line in the html display.

How can I fix it?

The code to inject
:

doc.log['log'] = '<br>'.join(self.log)
about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda