Fieldtype

Developer
Supported

Expresso

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

best way to have curly quotes/typographically correct apostrophes?

Support (Resolved)

strudelmedia design
strudelmedia design

Hi,

Title says it all—I saw an earlier item here about this, but it was from 2011 and so I wanted to see if there was any more current info.

Thanks!

PutYourLightsOn
# 1
Developer
PutYourLightsOn

If you want it to auto replace then you’ll have to follow the instructions in this thread, as this was never added as part of the core add-on, and likely won’t be.

strudelmedia design
# 2
strudelmedia design

Thanks, that works just fine for the curly quotes. So a follow-up: I’ve got the curly quotes now, but I’d also like the apostrophe to be the typographically correct version, but what is being rendered is '

Any ideas on that?

PutYourLightsOn
# 3
Developer
PutYourLightsOn

Haven’t tested but I assume the following should work:

$data str_replace(''''’'$data); 
strudelmedia design
# 4
strudelmedia design

Hi, and thanks for the speedy reply!

So that’s not doing for the typographic apostrophe, I’m still getting the

' 

.

So two questions: this is what I put in my ft.expresso.php file:

$data str_replace('"''"'$data);
   
$data str_replace(''''’'$data);
        
$options = array(
         
'text_format' => 'xhtml'

Does that look right?

Other question: I notice in the Expresso settings in EE this line: “Additional Entities to Escape” and “#39,#123,#125”

Would I need to do something with the #39?

PutYourLightsOn
# 5
Developer
PutYourLightsOn

Ah in that case this should work:

$data str_replace(''''’'$data); 
strudelmedia design
# 6
strudelmedia design

Thanks! That did it. I appreciate the assistance.

PutYourLightsOn
# 7
Developer
PutYourLightsOn

Sure thing, glad to hear it’s working for you now.