tags:

views:

183

answers:

2

I'm using v2.0 of ClassTextile.php, with the following call:

$testimonial_text = $textile->TextileRestricted($_POST['testimonial']);

... and all of my apostrophes (ex. It's hot in here) are being translated to ASCII ‘ (which is a single quote, which slopes the wrong way). What it should be is ASCII ’. I've also tried using TextileThis() and I have the same problem.

If I go and try it on Textile's website (http://textile.thresholdstate.com/), it gives the correct ASCII code. So why isn't it working with the downloadable library? Or am I doing something wrong?

A: 

Have you really copy-pasted the text from your source code to the form on their website? If this still yields the same result, you should probably upgrade your version.

soulmerge
I'm using the latest version (just downloaded it again from the website), and my code is almost verbatim what the example code is (what I had reprinted in my question).
neezer
That does not sound as if the example string had been copy-pasted - The two characters look exactly the same (depoending on your fonts settings) but translate to different values. Try copy-pasting the following two characters into the input box on the link you provided: ''
soulmerge
A: 

Hmm code looks clean, I would suggest passing in the POST and a variable instead of directly just to see if there is some kinda bug. I don't think the results will change just ruling out that option.

$var = $_POST['testimonial'];
$testimonial_text = $textile->TextileRestricted($var);
Phill Pafford