Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread tedd
At 11:45 PM + 8/9/07, Ólafur Waage wrote: I know this isn't exactly a php related question but due to the quality of answers ive seen lately ill give this a shot. (yes yes im smoothing up the crowd before the question) I have a weblog system that i am creating, the trouble is that if a user

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Richard Heyes
How can i match an image tag correctly so it does not cause any issues with how the user adds the image. preg_match_all('/img[^]*/Ui'); Off the top of my head. This wouldn't allow for using the right angle bracket in the img tag, but that's almost never going to happen in reailty. --

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Richard Heyes
Richard Heyes wrote: How can i match an image tag correctly so it does not cause any issues with how the user adds the image. preg_match_all('/img[^]*/Ui'); Off the top of my head. This wouldn't allow for using the right angle bracket in the img tag, but that's almost never going to happen

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Tijnema
On 8/11/07, Richard Heyes [EMAIL PROTECTED] wrote: Richard Heyes wrote: How can i match an image tag correctly so it does not cause any issues with how the user adds the image. preg_match_all('/img[^]*/Ui'); Off the top of my head. This wouldn't allow for using the right angle

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Richard Heyes
img src=image.jpg Your script doesn't catch above ;) So don't write HTML like that. -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Tijnema
On 8/11/07, Richard Heyes [EMAIL PROTECTED] wrote: img src=image.jpg Your script doesn't catch above ;) So don't write HTML like that. Depends where the HTML is coming from, it might be user input Tijnema -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Richard Heyes
img src=image.jpg Your script doesn't catch above ;) So don't write HTML like that. Depends where the HTML is coming from, it might be user input Ok, add \s* after the initial angle bracket. -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Stut
Tijnema wrote: On 8/11/07, Richard Heyes [EMAIL PROTECTED] wrote: Richard Heyes wrote: How can i match an image tag correctly so it does not cause any issues with how the user adds the image. preg_match_all('/img[^]*/Ui'); Off the top of my head. This wouldn't allow for using the right angle

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Tijnema
On 8/11/07, Stut [EMAIL PROTECTED] wrote: Tijnema wrote: On 8/11/07, Richard Heyes [EMAIL PROTECTED] wrote: Richard Heyes wrote: How can i match an image tag correctly so it does not cause any issues with how the user adds the image. preg_match_all('/img[^]*/Ui'); Off the top of my

Re: [PHP] preg_match_all to match img tags

2007-08-11 Thread Ólafur Waage
Ive already finished the code and pasted it to this mailing list :) Just an fyi. Ólafur Waage 2007/8/11, Tijnema [EMAIL PROTECTED]: On 8/11/07, Stut [EMAIL PROTECTED] wrote: Tijnema wrote: On 8/11/07, Richard Heyes [EMAIL PROTECTED] wrote: Richard Heyes wrote: How can i match

Re: [PHP] preg_match_all to match img tags

2007-08-10 Thread Ólafur Waage
-Original Message- From: brian [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 3:18 AM To: php-general@lists.php.net Subject: Re: [PHP] preg_match_all to match img tags Ólafur Waage wrote: I know this isn't exactly a php related question but due to the quality of answers ive

Re: [PHP] preg_match_all to match img tags

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 6:45 pm, Ólafur Waage wrote: I know this isn't exactly a php related question but due to the quality of answers ive seen lately ill give this a shot. (yes yes im smoothing up the crowd before the question) I have a weblog system that i am creating, the trouble is that

[PHP] preg_match_all to match img tags

2007-08-09 Thread Ólafur Waage
I know this isn't exactly a php related question but due to the quality of answers ive seen lately ill give this a shot. (yes yes im smoothing up the crowd before the question) I have a weblog system that i am creating, the trouble is that if a user links to an external image larger than

Re: [PHP] preg_match_all to match img tags

2007-08-09 Thread brian
Ólafur Waage wrote: I know this isn't exactly a php related question but due to the quality of answers ive seen lately ill give this a shot. (yes yes im smoothing up the crowd before the question) I have a weblog system that i am creating, the trouble is that if a user links to an external

RE: [PHP] preg_match_all to match img tags

2007-08-09 Thread Jan Reiter
@lists.php.net Subject: Re: [PHP] preg_match_all to match img tags Ólafur Waage wrote: I know this isn't exactly a php related question but due to the quality of answers ive seen lately ill give this a shot. (yes yes im smoothing up the crowd before the question) I have a weblog system that i am