Welcome to Geeklog Friday, July 03 2020 @ 10:44 pm EDT

Geeklog Forums

Why is the XHTML parameter only used for XHTML?


Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
Geeklog only closes standalone tags (like br) in XHTML mode. I was just wondering why don't you instinctively close every standalone tag with or without XHTML? It probably takes you more time to write ". XHTML ." instead of just "/".

Or maybe is it for future cases in which the XHTML parameter would be something different than "/"?

Just curious.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
<br/> is not valid HTML.

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
Interesting. I thought XHTML is just stricter HTML. How come nl2br uses this slash?
 Quote

ironmax

Anonymous
This might actually clear it up for you.

http://www.webmasterworld.com/forum21/12284.htm

or here

http://www.w3schools.com/tags/tag_br.asp

and for your nl2br

http://php.net/manual/en/function.nl2br.php

Michael
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
The bottom line is that the nl2br version Geeklog uses always outputs the slash. Geeklog uses nl2br in a lot of places, whether it uses the HTML modes or not. The only solution at this version is to run nl2br through a middleman function that cuts off the slash in HTML mode.

I've therefore added this to the tracker. Are there any other PHP commands that always output slash in standalone HTML tags?
 Quote

ironmax

Anonymous
Quote by: LWC


I've therefore added this to the tracker. Are there any other PHP commands that always output slash in standalone HTML tags?



See if this helps.

http://www.shawnolson.net/a/1334/php-strip_tags-and-standalone-xhtml-elements.html

Michael
 Quote

All times are EDT. The time is now 10:44 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content