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

106
Vistas
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 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