Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-01 15:15:32

beechy
Member
Registered: 2006-03-02
Posts: 92

Escape html in php tag

I am using a

<?php include ‘footer.php’; ?>

To include some content from a directory outside of my textpattern install.

The content displays in my textpattern page however there is a problem with the character formating

eg £ currently displays as £

Is there any way of escaping the html so that charcters output correctly.

Thanks in advance

Last edited by beechy (2010-09-01 15:17:49)

Offline

#2 2010-09-01 20:22:43

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Escape html in php tag

It’s not a HTML escape issue, but a character encoding issue (latin1 versus UTF-8 or something like that). Textpattern uses UTF-8, so all content has to be stored in that character encoding (or you have to use utf8_encode() to transform it into UTF8, assuming the original text was latin1).

Offline

#3 2010-09-02 08:48:02

beechy
Member
Registered: 2006-03-02
Posts: 92

Re: Escape html in php tag

Thanks for that ruud.

Offline

Board footer

Powered by FluxBB