Page 1 of 1

Custom Forum having problems rendering HTML tags

Posted: Sun Jan 29, 2012 11:32 am
by Vladimir Sixx
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.

Re: Custom Forum having problems rendering HTML tags

Posted: Sun Jan 29, 2012 3:16 pm
by social_experiment
Can you paste the code for the WYSIWYG editor

Re: Custom Forum having problems rendering HTML tags

Posted: Sun Jan 29, 2012 6:05 pm
by Vladimir Sixx
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.

Re: Custom Forum having problems rendering HTML tags

Posted: Mon Jan 30, 2012 12:06 am
by social_experiment
It's probably better then to contact the authors of the software and inform them of the issue

Re: Custom Forum having problems rendering HTML tags

Posted: Mon Jan 30, 2012 3:32 pm
by Vladimir Sixx
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.

Re: Custom Forum having problems rendering HTML tags

Posted: Mon Jan 30, 2012 3:43 pm
by social_experiment
Vladimir Sixx wrote: If I take away html_enetity_decoded
How do you filter data that you write to the database? Strip_tags(), htmlentities() ?

Re: Custom Forum having problems rendering HTML tags

Posted: Tue Jan 31, 2012 4:56 pm
by Vladimir Sixx
I have tried both htmlentites() and nl2br (htmlscepicalchars()) and end with the same result.

And BTW, thanks, I do appreciate the help.