Custom Forum having problems rendering HTML tags
Moderator: General Moderators
-
Vladimir Sixx
- Forum Newbie
- Posts: 4
- Joined: Sun Jan 29, 2012 11:22 am
Custom Forum having problems rendering HTML tags
I've create a simple forum for my website and it runs correctly but I wanted a way for people to post link, images and what-not so I put a WSYIWYG rich text editor that I'm using on another part of my site and it when I go view the post all the images and links are broken and when I take a closer look the URL that it's publishing is something like http://www.mysite.com/forum/http://www. ... /image.jpg and the URL for all links look similar to that as well. I'm using the exact same WYSIWYG on another part of my site and everything works perfectly and I can't figure out why it's putting my URL before the correct one. If anyone has any suggestions I would be open to try anything. This has been driving me crazy for a while now and it's the last thing I really need to figure out so everything is up and running correctly.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Custom Forum having problems rendering HTML tags
Can you paste the code for the WYSIWYG editor
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
Vladimir Sixx
- Forum Newbie
- Posts: 4
- Joined: Sun Jan 29, 2012 11:22 am
Re: Custom Forum having problems rendering HTML tags
I'm using TinyMCE, so I don't know which file you need the code for. I haven't edited TinyMCE at all cause it's working flawlessly on a different section of my site.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Custom Forum having problems rendering HTML tags
It's probably better then to contact the authors of the software and inform them of the issue
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
Vladimir Sixx
- Forum Newbie
- Posts: 4
- Joined: Sun Jan 29, 2012 11:22 am
Re: Custom Forum having problems rendering HTML tags
Well I've been messing with it a little more and it has something to do with how I'm rendering out the HTML coming from my DB. If I take away html_enetity_decoded it shows the URL is correct and when I go into my DB the URL is correct. So it's gotta be something with how my page is rendering out the image and link URLs but I just don't even know where to start looking for this error. If you can't tell I'm still pretty new to php but I've been working hard to learn as much as I can so I can get out of this "Noob" state that I know I'm at right now.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Custom Forum having problems rendering HTML tags
How do you filter data that you write to the database? Strip_tags(), htmlentities() ?Vladimir Sixx wrote: If I take away html_enetity_decoded
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
Vladimir Sixx
- Forum Newbie
- Posts: 4
- Joined: Sun Jan 29, 2012 11:22 am
Re: Custom Forum having problems rendering HTML tags
I have tried both htmlentites() and nl2br (htmlscepicalchars()) and end with the same result.
And BTW, thanks, I do appreciate the help.
And BTW, thanks, I do appreciate the help.