# Problem with fix for bug #31672

- Thread: https://externals.io/message/15297
- Original archive: https://news-web.php.net/php.internals/15297
- Started by Zeev Suraski on 2005-03-07T14:10:57+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15297 — Zeev Suraski — 2005-03-07T14:10:57+00:00

URL: https://externals.io/message/15297#15297

Guys,

I'd like to revert the fix for bug #31672 ("</script> is not considered 
closing tag if preceded by one-line comment").  While theoretically 
correct, I'd rather resolve it by fixing the docs.

The reason is simple - unlike ?> and %>, the string "</script>" is very 
much likely to appear inside one line comments:

// print "<script>foo</script>";

That suddenly fails.  That's probably the reason we didn't implement it in 
the first place.

Any objections to reverting this fix?

Zeev

---

## #15298 — Ilia Alshanetsky — 2005-03-07T14:34:24+00:00

URL: https://externals.io/message/15297#15298 · In reply to: #15297

Good point, +1 for revert.

Ilia

Zeev Suraski wrote:
> Guys,
> 
> I'd like to revert the fix for bug #31672 ("</script> is not considered 
> closing tag if preceded by one-line comment").  While theoretically 
> correct, I'd rather resolve it by fixing the docs.
> 
> The reason is simple - unlike ?> and %>, the string "</script>" is very 
> much likely to appear inside one line comments:
> 
> // print "<script>foo</script>";
> 
> That suddenly fails.  That's probably the reason we didn't implement it 
> in the first place.
> 
> Any objections to reverting this fix?
> 
> Zeev

---

## #15299 — M. Sokolewicz — 2005-03-07T15:39:42+00:00

URL: https://externals.io/message/15297#15299 · In reply to: #15298

I very much agree with this. It's very common to output JavaScript via 
PHP, and that also uses the <script></script> tags...so...

Ilia Alshanetsky wrote:
> Good point, +1 for revert.
> 
> Ilia
> 
> Zeev Suraski wrote:
> 
> > […]

---

## #15300 — Marcus Boerger — 2005-03-07T18:38:06+00:00

URL: https://externals.io/message/15297#15300 · In reply to: #15297

Hello Zeev,

 i do not think this is a good excuse for ignoring xml compliance.

marcus

Monday, March 7, 2005, 3:10:57 PM, you wrote:

> Guys,

> I'd like to revert the fix for bug #31672 ("</script> is not considered 
> closing tag if preceded by one-line comment").  While theoretically 
> correct, I'd rather resolve it by fixing the docs.

> The reason is simple - unlike ?> and %>, the string "</script>" is very 
> much likely to appear inside one line comments:

> // print "<script>foo</script>";

> That suddenly fails.  That's probably the reason we didn't implement it in
> the first place.

> Any objections to reverting this fix?

> Zeev




-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #15305 — Zeev Suraski — 2005-03-08T06:27:31+00:00

URL: https://externals.io/message/15297#15305 · In reply to: #15297

At 20:38 07/03/2005, Marcus Boerger wrote:
>Hello Zeev,
>
>  i do not think this is a good excuse for ignoring xml compliance.

I don't exactly follow what you're saying - can you elaborate?

Zeev

---

## #15307 — Marcus Boerger — 2005-03-08T11:34:57+00:00

URL: https://externals.io/message/15297#15307 · In reply to: #15305

Hello Zeev,

Tuesday, March 8, 2005, 7:27:31 AM, you wrote:

> At 20:38 07/03/2005, Marcus Boerger wrote:
> > […]

> I don't exactly follow what you're saying - can you elaborate?

I do not see any reason to make php a proprietary format ignoring xml rules
just to allow some stupid simplification which is not needed at all. Every
one that uses java script and and some server based scripting language knows
that it is impossible to write closing tags completley into echo/print
statements. Thus i suggesst we reintroduce the patch and live with the fact
that we need to write echo "<"."/script>" instead of echo "</script>".


-- 
Best regards,
 Marcus                            mailto:helly@php.net
