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

109
Visualizações
Textarea Input Not Rendering HTML

I am using a textarea on my Content Creation site and when my users post content they are trying to post shortened links as A HREF for TinyMCE would do. I installed TinyMCE correctly but the textarea still does not permit HTML to be shown. Is there some sort of PHP or JS that I have used that is causing the mess? My website is too big for me to just post code. Please help with this. I have lost users due to this.

Was told that my script and or server is processing USER input from a textarea literally much like Facebook does. So when it sees <a href it just prints it instead of processing it. which is weird because when a user posts the embed code from Youtube... it posts the video but ALSO posts the entire EMBED code in text as well.

I don't know if I can change it or not but I would like shortened links. ALL I KNOW IS THAT THE FOLLOWING CODE DEFINITELY AFFECTS IT!

if($pStatus == '1'){
        if(!empty($userPostText)){ 
            if(isset($userPostHashTags) && !empty($userPostHashTags)){
                echo $urlHighlight->highlightUrls($iN->sanitize_output($iN->iN_RemoveYoutubelink($userPostText),$base_url));
            }else{
                echo $urlHighlight->highlightUrls($iN->iN_RemoveYoutubelink($userPostText));
            } 
        }
        $regexUrl = '/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i'; 
        $totalUrl = preg_match_all($regexUrl, $userPostText, $matches);
        
        $urls = $matches[0];
        // go over all links
        foreach($urls as $url) 
        {
            $em = new Url_Expand($url);
            // Get the link size
            $site = $em->get_site();
    
            if ($site != "") {
                // If code is iframe then show the link in iframe
                $code = $em->get_iframe();
                if ($code == "") {
                    // If code is embed then show the link in embed
                    $code = $em->get_embed();
                    if ($code == "") {
                        // If code is thumb then show the link medium
                        $codesrc = $em->get_thumb("medium");
                    }
                }
                echo $code;
            } 
        }
    }else{ 
        echo '<div style="width:100%;position:relative;height:365px;overflow:hidden;border-radius:15px;background: linear-gradient(90deg , #f65169, #fab429);">'.html_entity_decode($onlySubs).'</div>'; 
    }
    /*********************************/ 
    ?> 
    </div>

And furthermore, is there a way to add an HREF call to this where user types HERE IS MY SHORTENED LINK amd when the user submits that, it is processed as the actual HTML code. This would complete my programming for the site. Thanks to all in advance!

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