Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-10-25 13:21:46

garbo
Member
From: Montreal, Canada
Registered: 2007-01-02
Posts: 28
Website

[textile] Conflict between smart quotes and link text in Textile

I know that Textile turns straight quotes into curly or smart quotes. That’s fine.

And to add a hyperlink to some text, you surround the text with quotes followed by a colon and then the URL after that.

But in one instance in an article body, my quotes for the link text is being converted to smart quotes and thus disabling the hyperlinks.

*For news, events and great articles on the Campania region visit*
"Campanica Digest":http://campanica.blo​gspot.com/ or their "Campanica Digest Facebook Page":http://facebook.com/​campanica
<p><strong>For news, events and great articles on the Campania region visit</strong><br />
“Campanica Digest”:http://campanica.blo​gspot.com/ or their “Campanica Digest Facebook Page”:http://facebook.com/​campanica</p>

in HTML.

What gives? I tried copying and pasting a straight quote from other links on the page and retyping. I’ve Googled for a solution and in this forum, but I’ve not found any answers.

Note: previewing this post again yields the smart quotes, but I don’t know how to disable them for the links. I thought the colon followed by the URL would turn off the smart quotes :(

Someone kind enough to point me in the right direction would be appreciated :)

Edit: fixing blockcodes (maniqui)

Last edited by maniqui (2011-10-25 13:29:06)

Offline

#2 2011-10-25 13:24:18

garbo
Member
From: Montreal, Canada
Registered: 2007-01-02
Posts: 28
Website

Re: [textile] Conflict between smart quotes and link text in Textile

Sorry. As you can see, the smart quotes took over again and ruined the code in my post. Unicode characters show up in the HTML. You’ll just have to trust me.

<p><strong>For news, events and great articles on the Campania region visit</strong><br />
&amp;#8220;Campanica Digest”:http://campanica.blo​gspot.com/ or their &amp;#8220;Campanica Digest Facebook Page”:http://facebook.com/​campanica</p>

Offline

#3 2011-10-25 13:24:50

garbo
Member
From: Montreal, Canada
Registered: 2007-01-02
Posts: 28
Website

Re: [textile] Conflict between smart quotes and link text in Textile

Argh. Messed up again.

Offline

#4 2011-10-25 14:00:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: [textile] Conflict between smart quotes and link text in Textile

What the…?

If I copy and paste your code exactly from the first text box in your opening post into a fresh article I get the same behaviour you describe. If I retype campanica.blogspot.com and save, the link appears correctly.

Via some judicial trial-and-error I have narrowed the problem down to some weirdness occurring between the ‘o’ and ‘g’ characters of ‘blogspot’. If you, for example, paste your original version in then place your cursor in the text box in front of the word ‘blog’ and use the right-arrow to step through the characters, notice that when you hit the ‘o’ it then takes two further presses of the arrow to reach the ‘g’?

Something odd is going on there: some Unicode character maybe? I suggest highlighting both letters of the ‘og’ together and retyping it, though I’d love to know what causes this behaviour. Perhaps before you do that you can look in the database in the Body_html field to see if there’s any strange characters encoded between the two. I can’t see anything here, but there’s something there alright.

Wacky!

Last edited by Bloke (2011-10-25 14:02:43)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2011-10-25 14:06:02

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: [textile] Conflict between smart quotes and link text in Textile

If I copy your text, then gives me the same quotes. When I re-write the URL, then it works with the link.

Edit: That was nearly the same as Bloke has described with more details.

Last edited by GugUser (2011-10-25 14:20:24)

Offline

#6 2011-10-25 20:14:47

txpnisti
Member
Registered: 2009-02-25
Posts: 23

Re: [textile] Conflict between smart quotes and link text in Textile

Your links look just ok with Firefox, but with Opera I can actually see those mentioned extra characters straight away (or at least some nasty squares); there is other one in the facebook link too. It is before the word campanica, facebook.com/——here—-campanica.

Where did the original text come? I mean, sometimes I have a feeling that these kind things may appear when the text has been travelling between different editors (doc, rtf) before saving in txp.

Offline

#7 2011-10-25 21:20:04

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [textile] Conflict between smart quotes and link text in Textile

It’s a &#8203;

The funny thing is: I can enter one between the apostrophes, and it makes a link (at least here in the preview).


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB