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

246
Visualizações
How to find unclosed html tags or make the weird styling as a result contained in one element?

I have a tinyMCE editor that allows HTML.

Sometimes a user pastes a table from a website or some other content that is not copied in its entirety, resulting in broken html.

I display this content on a page which breaks sometimes due to this. Example image:

enter image description here

What is the best way to fix this? Is there a way to isolate this html somehow so the content of this element does not affect the rest of the page? Or is there a function to automatically close all tags?

I just simply display the content like this:

<div class="editwindow">
    <h4 class="mt-0 m-b-30 header-title bigheader">'.$gettopcatcontent['title'].'</h4>
    <div class="content_tekst">'.$gettopcatcontent['content'].'</div>
    '.$versiondate.'
</div>
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Just use the W3C Markup Validator Service

about 4 years ago · Juan Pablo Isaza Relatório

0

You can possibly use DOMDocument::loadHTML. It will produce warnings for malformed HTML.

Set libxml_use_internal_errors to true and then use libxml_get_errors to handle the warnings.

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