Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!