Allowing HTML in news posts?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Allowing HTML in news posts?

Post by Elmseeker »

Hi everyone,

I just wrote up a very simple news posting script for the front page so I can update people as to what is going on with the development of the site. I posted a news article and included:

Code: Select all

<HREF="http://kidstop.farviolet.com/phpBB2/">http://kidstop.farviolet.com/phpBB2/</A>
and in the status bar the link showed up as:

Code: Select all

http://kidstop.farviolet.com/"http://kidstop.farviolet.com/phpBB2/"
in order to get it to work properly I had to change the news I submitted as:

Code: Select all

<A HREF=phpBB2>http://kidstop.farviolet.com/phpBB2/</A>
What do I have to do in order to be able to use normal HTML in my news postings?

Thanks.
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

you'll need to put slashes behind the quotes (\)

For instance, normal html:

Code: Select all

<font color="red">Something</font>
should turn into:

Code: Select all

<font color="red">Something</font>
This is so PHP doesn't confuse it's quotes with the quotes you put in.
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Post by Elmseeker »

Thanks,

I had thought of that also but what about the fact that it prepends the URL with my domain?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

I dont know, PHP would have nothing to do with that, you would have to had programmed it in, or IE or something is prepending it.

If you post the script I'll see if it might be anything.
Post Reply