Novemberborn, Straight lines circle sometime

More Site Updates

After some hard work (cough) I’ve updated the following:

TextPattern rocks.

link | site | 14 October 2005, 23:23


Comments

  1. (Making sure the new comment stuff actually works…)

    Mark Wubben | 14 October 2005, 23:23 | link

  2. (Yup!)

    Mark Wubben | 14 October 2005, 23:24 | link

  3. Just curious: how did you move to html 4.01 ?

    Philippe | 15 October 2005, 04:13 | link

  4. Well aside from modifying the templates, you need to put this code in publish.php:

    $html = preg_replace("/<(.+)\s\/>/", "", $html);
    $html = preg_replace("/<(.+)\/>/", "", $html);
    
    header("Content-type: text/html; charset=utf-8");
    

    (Basically you add the $html stuff before header())

    This makes sure no /> is left in the code. I tried doing it with one RegExp, but it’d match the whitespace and keep it, so I’m using two.

    The only thing which could cause problems now is TextPattern spewing out namespaced attributes, since this RegExp isn’t looking for those.

    Mark Wubben | 15 October 2005, 21:07 | link

  5. Thanks, Mark. That is more or less the same route I was considering. Hadn’t worked on it yet, though.

    Philippe | 16 October 2005, 06:59 | link

  6. Why did you move from XHTML to HTML 4.01, Mark?

    Lief Stryder van der Baan | 16 October 2005, 18:12 | link

  7. I never moved, the previous version also was HTML :)

    But for compatibility, XHTML needs to be sent as HTML. Which means browsers see it as invalid HTML, no matter how valid the XHTML is. Furthermore, you can write just as clean code in HTML as in XHTML, so I don’t see a reason to use XHTML. And it’s a point of pride in this day and age that I use HTML ;-)

    Mark Wubben | 16 October 2005, 18:57 | link

Leave your comment

Please keep it polite and on topic. Yes, your e-mail address is required, but it's kept private. HTML is not allowed in the comments but you can use Markdown. Non-contributing comments run the risk of being removed. Especially if the website seem “fishy”. Spammers, beware.

(required)
(required, kept private)
(optional, but let's share it!)
(required)

Remember my details


Novemberborn: Extra

About the author

Mark Wubben is a European Dutchman and web hacker, based in Copenhagen, Denmark. Supercollider is Mark's freelance alter-ego.

Read more about Mark...

Go to

Jobs (NL)

Xopus zoekt programmeurs! Verbeter de code en win!

Subscribe