Thread: [phpWebLog-devel] balancing HTML tags
Brought to you by:
openface
From: Tux N. <lin...@ur...> - 2000-07-06 06:48:09
|
Just curious -- do you have code written for balancing HTML tags? Like, matching the b's in a submission with the /b's. Or, more importantly, matching table with /table -- since things like a missing /table will prevent rendering a whole page. Generally, you can't rely on the users to balance tags in an article -- they may be new to HTML, or may be mailcious. Usually the former, probably. Maybe something like this function tag_imbalance($tag,$htmlarticle) { // counts <$tag> and subtracts count of </$tag> // does \< need to be escaped \ or not? can't remember // \/ certainly needs the \ escape $match = "/\<".$tag."/"; $antimatch = "/\<\/".$tag."/"; // what goes up must come down? $cmatch = count(preg_split($match,$htmlarticle)); $canti = count(preg_split($antimatch,$htmlarticle)); return($cmatch-$canti); } Or do you think 'its just not a problem? ________________________________________________ Get your own "800" number - Free Free voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag |
From: philip o. <ph...@th...> - 2000-07-06 08:33:49
|
so if i write this in a story : hello <b>everyone i think this is great, do you? how is it to know where i want the </b> ? am i missing something? please explain. philip |
From: Alex C. <ac...@fo...> - 2000-07-10 05:36:16
|
Latest Unstable: From Poll Block - Click results - From Graph - Click More Polls Then click the Title of any of the Polls. Error: Warning: Cannot add header information - headers already sent by (output started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 common.inc.php - header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); |
From: Jason H. <ope...@ey...> - 2000-07-10 06:04:35
|
Hmm.. I can't seem to replicate this error on the devel server. (http://phpweblog.greenhell.com) Is there anything specifically funky about your poll? (funny characters in the poll name or such?) - jason Alex Chun wrote: > > Latest Unstable: > > >From Poll Block - Click results - From Graph - Click More Polls > Then click the Title of any of the Polls. > > Error: > > Warning: Cannot add header information - headers already sent by (output > started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 > > common.inc.php - > header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel |
From: Alex C. <ac...@fo...> - 2000-07-10 06:14:06
|
Try it now. You only had one Poll in on the development server. From your development server: Warning: Cannot add header information - headers already sent by (output started at inc.d/header.inc:5) in inc.d/common.inc.php on line 577 -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Jason Hines Sent: Sunday, July 09, 2000 11:08 PM To: php...@li... Subject: Re: [phpWebLog-devel] Nutter Polls bug. Printer 2 headers Hmm.. I can't seem to replicate this error on the devel server. (http://phpweblog.greenhell.com) Is there anything specifically funky about your poll? (funny characters in the poll name or such?) - jason Alex Chun wrote: > > Latest Unstable: > > >From Poll Block - Click results - From Graph - Click More Polls > Then click the Title of any of the Polls. > > Error: > > Warning: Cannot add header information - headers already sent by (output > started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 > > common.inc.php - > header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel _______________________________________________ phpWebLog-devel mailing list php...@li... http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel |
From: Alex C. <ac...@fo...> - 2000-07-10 06:15:15
|
Results -> More Polls -> "Poll?" Doesn't work on the test'tindf poll -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Jason Hines Sent: Sunday, July 09, 2000 11:08 PM To: php...@li... Subject: Re: [phpWebLog-devel] Nutter Polls bug. Printer 2 headers Hmm.. I can't seem to replicate this error on the devel server. (http://phpweblog.greenhell.com) Is there anything specifically funky about your poll? (funny characters in the poll name or such?) - jason Alex Chun wrote: > > Latest Unstable: > > >From Poll Block - Click results - From Graph - Click More Polls > Then click the Title of any of the Polls. > > Error: > > Warning: Cannot add header information - headers already sent by (output > started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 > > common.inc.php - > header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel _______________________________________________ phpWebLog-devel mailing list php...@li... http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel |
From: Jason H. <ope...@ey...> - 2000-07-10 06:24:04
|
Ah. I see it now.. but its not all my fault this time. ;p When you added a new poll, you gave it a name of "poll 2". In the Add Poll area, it says: Poll Name: ______________________ (do not use spaces) That's why. =] Jason Alex Chun wrote: > > Results -> More Polls -> "Poll?" > > Doesn't work on the test'tindf poll > > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of Jason > Hines > Sent: Sunday, July 09, 2000 11:08 PM > To: php...@li... > Subject: Re: [phpWebLog-devel] Nutter Polls bug. Printer 2 headers > > Hmm.. I can't seem to replicate this error on the devel server. > (http://phpweblog.greenhell.com) > > Is there anything specifically funky about your poll? (funny characters > in the poll name or such?) > > - jason > > Alex Chun wrote: > > > > Latest Unstable: > > > > >From Poll Block - Click results - From Graph - Click More Polls > > Then click the Title of any of the Polls. > > > > Error: > > > > Warning: Cannot add header information - headers already sent by (output > > started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 > > > > common.inc.php - > > header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); > > > > _______________________________________________ > > phpWebLog-devel mailing list > > php...@li... > > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel |
From: Jason H. <ope...@ey...> - 2000-07-10 06:28:28
|
Actually, there was a bug here anyway closely related. Plus I fixed the issue of not allowing a space in the poll name. Good ole urlencode(). Thanks. jason Jason Hines wrote: > > Ah. I see it now.. but its not all my fault this time. ;p > > When you added a new poll, you gave it a name of "poll 2". > > In the Add Poll area, it says: > > Poll Name: ______________________ (do not use spaces) > > That's why. =] > > Jason > > Alex Chun wrote: > > > > Results -> More Polls -> "Poll?" > > > > Doesn't work on the test'tindf poll > > > > -----Original Message----- > > From: php...@li... > > [mailto:php...@li...]On Behalf Of Jason > > Hines > > Sent: Sunday, July 09, 2000 11:08 PM > > To: php...@li... > > Subject: Re: [phpWebLog-devel] Nutter Polls bug. Printer 2 headers > > > > Hmm.. I can't seem to replicate this error on the devel server. > > (http://phpweblog.greenhell.com) > > > > Is there anything specifically funky about your poll? (funny characters > > in the poll name or such?) > > > > - jason > > > > Alex Chun wrote: > > > > > > Latest Unstable: > > > > > > >From Poll Block - Click results - From Graph - Click More Polls > > > Then click the Title of any of the Polls. > > > > > > Error: > > > > > > Warning: Cannot add header information - headers already sent by (output > > > started at inc.d/header.inc:4) in inc.d/common.inc.php on line 581 > > > > > > common.inc.php - > > > header("Location:$G_URL/$REQUEST_URI?msg=$tmp"); > > > > > > _______________________________________________ > > > phpWebLog-devel mailing list > > > php...@li... > > > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel > > > > _______________________________________________ > > phpWebLog-devel mailing list > > php...@li... > > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel > > > > _______________________________________________ > > phpWebLog-devel mailing list > > php...@li... > > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel > > _______________________________________________ > phpWebLog-devel mailing list > php...@li... > http://lists.sourceforge.net/mailman/listinfo/phpweblog-devel |