Discussion:
single quote in content ends up as Unicode Character 'RIGHT SINGLE QUOTATION MARK'
Haluk Karamete
2014-05-27 00:31:52 UTC
Permalink
This is a trickty one...

When I type in ' ( which is a simple single quote) in the content area in
my shortcode, I see that it ends up as a 'right single quotation mark' that
is ’

That's observation #1.

It gets even more interesting, but when I put two of them, one after the
other like this, ( '' ) , I ended up with ” ( instead of
’’).

This is very confusing to me cause I'm middle of parsing my structured data
based shortcode. The content area interferes with me big time.

Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with ’? Could you point me
the location where this is happening?

With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.

Thank you
Otto
2014-05-27 01:15:46 UTC
Permalink
That would be the wptexturize function.

http://codex.wordpress.org/Function_Reference/wptexturize

-Otto
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content area in
my shortcode, I see that it ends up as a 'right single quotation mark' that
is ’
That's observation #1.
It gets even more interesting, but when I put two of them, one after the
other like this, ( '' ) , I ended up with ” ( instead of
’’).
This is very confusing to me cause I'm middle of parsing my structured data
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with ’? Could you point me
the location where this is happening?
With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Haluk Karamete
2014-05-27 01:18:45 UTC
Permalink
Thank you Otto. That nails it.
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content area in
my shortcode, I see that it ends up as a 'right single quotation mark'
that
Post by Haluk Karamete
is ’
That's observation #1.
It gets even more interesting, but when I put two of them, one after the
other like this, ( '' ) , I ended up with ” ( instead of
’’).
This is very confusing to me cause I'm middle of parsing my structured
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with ’? Could you point me
the location where this is happening?
With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Haluk Karamete
2014-05-27 10:55:38 UTC
Permalink
Otto,

The wp_texturize has a great functionality; If you use the HTML tag <code>
& </code> in your shortcode content area, it leaves that section untouched.
This way you can create sections within your shortcode as to which area
wp_texturize to operate on or off.

So for all the special symbols used within the <code> & </code> block,
(such as the single quote <code>'</code>), I get them as is. For example,
for the ', I get it as '. I do not get the &#8217; anymore. The <code>
feature simply takes care of the problem - in a brilliant way.

But...

If when you switch the post editor's Tiny MCI's visual tab, that simple &
innocent action ( which is irreversible ) removes the <code> and </code>
tags permanently and replaces them with &nbsp;! Then all bets are off.

Is it possible to prevent that from happening so that the structured data
area that I'm trying to protect thru the <code></code> in my shortcode is
immune to those innocent and accidental switches that may happen anytime on
the user's end?

I thought of tapping into the no_texturize_shortcodes filter - as expained
here (
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes),
as a different way to tackle the whole thing...

But I sense that that would assume the entire content area of the to be
avoided by the wp_texturize.

My shortcode has two sections... the regular content area section... and
the code section that has the code instructions .. I'd like to be able to
separate these two sections ( code and content ) from one another.

In other words, I'd like wp_texturize to do what's designed for on the
"content-content" area in my shortcode but leave the "content-code" section
alone..

If the <code></code> were to be preserved upon the visual-tab switch, I
would be done with this issue and programming the parser now. But I cannot
move on at this moment before I nail this issue in a future proof way.

What do you think can be done to pull this wish off?
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content area in
my shortcode, I see that it ends up as a 'right single quotation mark'
that
Post by Haluk Karamete
is &#8217;
That's observation #1.
It gets even more interesting, but when I put two of them, one after the
other like this, ( '' ) , I ended up with &#8221; ( instead of
&#8217;&#8217;).
This is very confusing to me cause I'm middle of parsing my structured
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with &#8217;? Could you point me
the location where this is happening?
With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Haluk Karamete
2014-05-27 11:39:42 UTC
Permalink
Otto,

I've found a solution to the issue. ( I tested and saw it works )

I simply switched point of views: Instead of protecting the structured data
within the <code></code> area ( which is problematic as my prev message
pointed out) and make that section immune to the wptexturize, I went the
other way. I made the entire shortcode to be exempt from the wptexturize
and mark the content-content section using a non-HTML delim (that the
visual tab editor cannot do anything about ) and apply the wptexturize
myself in the back end.

The simple steps are as follows;

step 1
use the no_texturize_shortcodes filter and made the shortcode to be exempt.

step 2
simply wrap the content area in my shortcode that I want to be processed by
wptexturize in {content}{content} delims.

step 3
in the back end, when processing the $content in my shortcode function,
simply do

$content = wptexturize($content);

- to apply the wptexturize magic over that section

This gives me piece of mind that the section that is not wrapped in
{content}{content} blocks are not processed by the wptexturize - thanks to
the step 1.

This approach has solved my problem.

Now I will see what I can do to do for the little brother of wptexturize
which is wpautop. :)
Post by Haluk Karamete
Otto,
The wp_texturize has a great functionality; If you use the HTML tag <code>
& </code> in your shortcode content area, it leaves that section untouched.
This way you can create sections within your shortcode as to which area
wp_texturize to operate on or off.
So for all the special symbols used within the <code> & </code> block,
(such as the single quote <code>'</code>), I get them as is. For example,
for the ', I get it as '. I do not get the &#8217; anymore. The <code>
feature simply takes care of the problem - in a brilliant way.
But...
If when you switch the post editor's Tiny MCI's visual tab, that simple &
innocent action ( which is irreversible ) removes the <code> and </code>
tags permanently and replaces them with &nbsp;! Then all bets are off.
Is it possible to prevent that from happening so that the structured data
area that I'm trying to protect thru the <code></code> in my shortcode is
immune to those innocent and accidental switches that may happen anytime on
the user's end?
I thought of tapping into the no_texturize_shortcodes filter - as expained
here (
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes), as a different way to tackle the whole thing...
But I sense that that would assume the entire content area of the to be
avoided by the wp_texturize.
My shortcode has two sections... the regular content area section... and
the code section that has the code instructions .. I'd like to be able to
separate these two sections ( code and content ) from one another.
In other words, I'd like wp_texturize to do what's designed for on the
"content-content" area in my shortcode but leave the "content-code" section
alone..
If the <code></code> were to be preserved upon the visual-tab switch, I
would be done with this issue and programming the parser now. But I cannot
move on at this moment before I nail this issue in a future proof way.
What do you think can be done to pull this wish off?
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content area
in
Post by Haluk Karamete
my shortcode, I see that it ends up as a 'right single quotation mark'
that
Post by Haluk Karamete
is &#8217;
That's observation #1.
It gets even more interesting, but when I put two of them, one after the
other like this, ( '' ) , I ended up with &#8221; ( instead of
&#8217;&#8217;).
This is very confusing to me cause I'm middle of parsing my structured
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with &#8217;? Could you point
me
Post by Haluk Karamete
the location where this is happening?
With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nikola Nikolov
2014-05-27 12:14:44 UTC
Permalink
Slightly off-topic, but Haluk - what are you trying to do with structured
data in shortcodes and aren't there any other options to store that data?

I'm guessing you're not manually entering structured data in the shortcode,
but are generating it instead?

Simply because if you find a different way to store and access this data.
you'll save yourself all of the troubles that you're having at the
moment(and such solutions can always conflict with some plugin in the
future) :)

Nikola
Post by Haluk Karamete
Otto,
I've found a solution to the issue. ( I tested and saw it works )
I simply switched point of views: Instead of protecting the structured data
within the <code></code> area ( which is problematic as my prev message
pointed out) and make that section immune to the wptexturize, I went the
other way. I made the entire shortcode to be exempt from the wptexturize
and mark the content-content section using a non-HTML delim (that the
visual tab editor cannot do anything about ) and apply the wptexturize
myself in the back end.
The simple steps are as follows;
step 1
use the no_texturize_shortcodes filter and made the shortcode to be exempt.
step 2
simply wrap the content area in my shortcode that I want to be processed by
wptexturize in {content}{content} delims.
step 3
in the back end, when processing the $content in my shortcode function,
simply do
$content = wptexturize($content);
- to apply the wptexturize magic over that section
This gives me piece of mind that the section that is not wrapped in
{content}{content} blocks are not processed by the wptexturize - thanks to
the step 1.
This approach has solved my problem.
Now I will see what I can do to do for the little brother of wptexturize
which is wpautop. :)
Post by Haluk Karamete
Otto,
The wp_texturize has a great functionality; If you use the HTML tag
<code>
Post by Haluk Karamete
& </code> in your shortcode content area, it leaves that section
untouched.
Post by Haluk Karamete
This way you can create sections within your shortcode as to which area
wp_texturize to operate on or off.
So for all the special symbols used within the <code> & </code> block,
(such as the single quote <code>'</code>), I get them as is. For example,
for the ', I get it as '. I do not get the &#8217; anymore. The <code>
feature simply takes care of the problem - in a brilliant way.
But...
If when you switch the post editor's Tiny MCI's visual tab, that simple &
innocent action ( which is irreversible ) removes the <code> and </code>
tags permanently and replaces them with &nbsp;! Then all bets are off.
Is it possible to prevent that from happening so that the structured data
area that I'm trying to protect thru the <code></code> in my shortcode is
immune to those innocent and accidental switches that may happen anytime
on
Post by Haluk Karamete
the user's end?
I thought of tapping into the no_texturize_shortcodes filter - as
expained
Post by Haluk Karamete
here (
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes),
as a different way to tackle the whole thing...
Post by Haluk Karamete
But I sense that that would assume the entire content area of the to be
avoided by the wp_texturize.
My shortcode has two sections... the regular content area section... and
the code section that has the code instructions .. I'd like to be able
to
Post by Haluk Karamete
separate these two sections ( code and content ) from one another.
In other words, I'd like wp_texturize to do what's designed for on the
"content-content" area in my shortcode but leave the "content-code"
section
Post by Haluk Karamete
alone..
If the <code></code> were to be preserved upon the visual-tab switch, I
would be done with this issue and programming the parser now. But I
cannot
Post by Haluk Karamete
move on at this moment before I nail this issue in a future proof way.
What do you think can be done to pull this wish off?
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
On Mon, May 26, 2014 at 7:31 PM, Haluk Karamete <
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content area
in
Post by Haluk Karamete
my shortcode, I see that it ends up as a 'right single quotation mark'
that
Post by Haluk Karamete
is &#8217;
That's observation #1.
It gets even more interesting, but when I put two of them, one after
the
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
other like this, ( '' ) , I ended up with &#8221; ( instead of
&#8217;&#8217;).
This is very confusing to me cause I'm middle of parsing my structured
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with &#8217;? Could you point
me
Post by Haluk Karamete
the location where this is happening?
With that location, I'm hoping to see the complete view of what other
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Haluk Karamete
2014-05-27 12:22:47 UTC
Permalink
THank you Nikola, for your interest in this.

As to your point on

I'm guessing you're not manually entering structured data in the shortcode,
Post by Nikola Nikolov
but are generating it instead?
I'm doing exactly that - that is manually entering structured data in the
shortcode.

I am planning to use this shortcode as a development tool, a utility to
pass safe data between the front and the back-end. with 0 eval.

This is a concept that I put a lot of time thinking about. When it shapes
up and matures, and hence becomes worthwhile to talk about or share, I will
do so.
Post by Nikola Nikolov
Slightly off-topic, but Haluk - what are you trying to do with structured
data in shortcodes and aren't there any other options to store that data?
I'm guessing you're not manually entering structured data in the shortcode,
but are generating it instead?
Simply because if you find a different way to store and access this data.
you'll save yourself all of the troubles that you're having at the
moment(and such solutions can always conflict with some plugin in the
future) :)
Nikola
Post by Haluk Karamete
Otto,
I've found a solution to the issue. ( I tested and saw it works )
I simply switched point of views: Instead of protecting the structured
data
Post by Haluk Karamete
within the <code></code> area ( which is problematic as my prev message
pointed out) and make that section immune to the wptexturize, I went the
other way. I made the entire shortcode to be exempt from the wptexturize
and mark the content-content section using a non-HTML delim (that the
visual tab editor cannot do anything about ) and apply the wptexturize
myself in the back end.
The simple steps are as follows;
step 1
use the no_texturize_shortcodes filter and made the shortcode to be
exempt.
Post by Haluk Karamete
step 2
simply wrap the content area in my shortcode that I want to be processed
by
Post by Haluk Karamete
wptexturize in {content}{content} delims.
step 3
in the back end, when processing the $content in my shortcode function,
simply do
$content = wptexturize($content);
- to apply the wptexturize magic over that section
This gives me piece of mind that the section that is not wrapped in
{content}{content} blocks are not processed by the wptexturize - thanks
to
Post by Haluk Karamete
the step 1.
This approach has solved my problem.
Now I will see what I can do to do for the little brother of wptexturize
which is wpautop. :)
Post by Haluk Karamete
Otto,
The wp_texturize has a great functionality; If you use the HTML tag
<code>
Post by Haluk Karamete
& </code> in your shortcode content area, it leaves that section
untouched.
Post by Haluk Karamete
This way you can create sections within your shortcode as to which area
wp_texturize to operate on or off.
So for all the special symbols used within the <code> & </code> block,
(such as the single quote <code>'</code>), I get them as is. For
example,
Post by Haluk Karamete
Post by Haluk Karamete
for the ', I get it as '. I do not get the &#8217; anymore. The <code>
feature simply takes care of the problem - in a brilliant way.
But...
If when you switch the post editor's Tiny MCI's visual tab, that
simple &
Post by Haluk Karamete
Post by Haluk Karamete
innocent action ( which is irreversible ) removes the <code> and
</code>
Post by Haluk Karamete
Post by Haluk Karamete
tags permanently and replaces them with &nbsp;! Then all bets are off.
Is it possible to prevent that from happening so that the structured
data
Post by Haluk Karamete
Post by Haluk Karamete
area that I'm trying to protect thru the <code></code> in my shortcode
is
Post by Haluk Karamete
Post by Haluk Karamete
immune to those innocent and accidental switches that may happen
anytime
Post by Haluk Karamete
on
Post by Haluk Karamete
the user's end?
I thought of tapping into the no_texturize_shortcodes filter - as
expained
Post by Haluk Karamete
here (
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes
),
Post by Haluk Karamete
as a different way to tackle the whole thing...
Post by Haluk Karamete
But I sense that that would assume the entire content area of the to be
avoided by the wp_texturize.
My shortcode has two sections... the regular content area section...
and
Post by Haluk Karamete
Post by Haluk Karamete
the code section that has the code instructions .. I'd like to be able
to
Post by Haluk Karamete
separate these two sections ( code and content ) from one another.
In other words, I'd like wp_texturize to do what's designed for on the
"content-content" area in my shortcode but leave the "content-code"
section
Post by Haluk Karamete
alone..
If the <code></code> were to be preserved upon the visual-tab switch, I
would be done with this issue and programming the parser now. But I
cannot
Post by Haluk Karamete
move on at this moment before I nail this issue in a future proof way.
What do you think can be done to pull this wish off?
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
On Mon, May 26, 2014 at 7:31 PM, Haluk Karamete <
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content
area
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
in
Post by Haluk Karamete
my shortcode, I see that it ends up as a 'right single quotation
mark'
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
that
Post by Haluk Karamete
is &#8217;
That's observation #1.
It gets even more interesting, but when I put two of them, one after
the
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
other like this, ( '' ) , I ended up with &#8221; ( instead of
&#8217;&#8217;).
This is very confusing to me cause I'm middle of parsing my
structured
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so that a
simple good old (') single quote ends up with &#8217;? Could you
point
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
me
Post by Haluk Karamete
the location where this is happening?
With that location, I'm hoping to see the complete view of what
other
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nikola Nikolov
2014-05-27 12:57:51 UTC
Permalink
Okay, I see now.

Then, in that case I'm not sure whether you can use a custom field to do
that same thing. It's just a thought and will probably decrease the ease of
use, but what about the following:

You have a single text area custom field that will hold all of your
structured data. It won't be affected by any of the filtering functions,
other plugins, etc.
In there if you need to(I'm not sure what your goal is), you can define
multiple data sets, or just a single one - based on whether you need to
have one or multiple sets of data.

Your shortcode will then look-up that data and if you have multiple sets of
data, find the correct one and do whatever it's supposed to do with it.

Again - that might make it a bit harder to use and design(especially if you
have to separate multiple data sets), but will save you the filters
headaches.

Nikola
Post by Haluk Karamete
THank you Nikola, for your interest in this.
As to your point on
I'm guessing you're not manually entering structured data in the shortcode,
Post by Nikola Nikolov
but are generating it instead?
I'm doing exactly that - that is manually entering structured data in the
shortcode.
I am planning to use this shortcode as a development tool, a utility to
pass safe data between the front and the back-end. with 0 eval.
This is a concept that I put a lot of time thinking about. When it shapes
up and matures, and hence becomes worthwhile to talk about or share, I will
do so.
Post by Nikola Nikolov
Slightly off-topic, but Haluk - what are you trying to do with structured
data in shortcodes and aren't there any other options to store that data?
I'm guessing you're not manually entering structured data in the
shortcode,
Post by Nikola Nikolov
but are generating it instead?
Simply because if you find a different way to store and access this data.
you'll save yourself all of the troubles that you're having at the
moment(and such solutions can always conflict with some plugin in the
future) :)
Nikola
Post by Haluk Karamete
Otto,
I've found a solution to the issue. ( I tested and saw it works )
I simply switched point of views: Instead of protecting the structured
data
Post by Haluk Karamete
within the <code></code> area ( which is problematic as my prev message
pointed out) and make that section immune to the wptexturize, I went
the
Post by Nikola Nikolov
Post by Haluk Karamete
other way. I made the entire shortcode to be exempt from the
wptexturize
Post by Nikola Nikolov
Post by Haluk Karamete
and mark the content-content section using a non-HTML delim (that the
visual tab editor cannot do anything about ) and apply the wptexturize
myself in the back end.
The simple steps are as follows;
step 1
use the no_texturize_shortcodes filter and made the shortcode to be
exempt.
Post by Haluk Karamete
step 2
simply wrap the content area in my shortcode that I want to be
processed
Post by Nikola Nikolov
by
Post by Haluk Karamete
wptexturize in {content}{content} delims.
step 3
in the back end, when processing the $content in my shortcode function,
simply do
$content = wptexturize($content);
- to apply the wptexturize magic over that section
This gives me piece of mind that the section that is not wrapped in
{content}{content} blocks are not processed by the wptexturize -
thanks
Post by Nikola Nikolov
to
Post by Haluk Karamete
the step 1.
This approach has solved my problem.
Now I will see what I can do to do for the little brother of
wptexturize
Post by Nikola Nikolov
Post by Haluk Karamete
which is wpautop. :)
On Tue, May 27, 2014 at 3:55 AM, Haluk Karamete <
Post by Haluk Karamete
Otto,
The wp_texturize has a great functionality; If you use the HTML tag
<code>
Post by Haluk Karamete
& </code> in your shortcode content area, it leaves that section
untouched.
Post by Haluk Karamete
This way you can create sections within your shortcode as to which
area
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
wp_texturize to operate on or off.
So for all the special symbols used within the <code> & </code>
block,
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
(such as the single quote <code>'</code>), I get them as is. For
example,
Post by Haluk Karamete
Post by Haluk Karamete
for the ', I get it as '. I do not get the &#8217; anymore. The
<code>
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
feature simply takes care of the problem - in a brilliant way.
But...
If when you switch the post editor's Tiny MCI's visual tab, that
simple &
Post by Haluk Karamete
Post by Haluk Karamete
innocent action ( which is irreversible ) removes the <code> and
</code>
Post by Haluk Karamete
Post by Haluk Karamete
tags permanently and replaces them with &nbsp;! Then all bets are
off.
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
Is it possible to prevent that from happening so that the structured
data
Post by Haluk Karamete
Post by Haluk Karamete
area that I'm trying to protect thru the <code></code> in my
shortcode
Post by Nikola Nikolov
is
Post by Haluk Karamete
Post by Haluk Karamete
immune to those innocent and accidental switches that may happen
anytime
Post by Haluk Karamete
on
Post by Haluk Karamete
the user's end?
I thought of tapping into the no_texturize_shortcodes filter - as
expained
Post by Haluk Karamete
here (
http://codex.wordpress.org/Plugin_API/Filter_Reference/no_texturize_shortcodes
Post by Nikola Nikolov
),
Post by Haluk Karamete
as a different way to tackle the whole thing...
Post by Haluk Karamete
But I sense that that would assume the entire content area of the to
be
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
avoided by the wp_texturize.
My shortcode has two sections... the regular content area section...
and
Post by Haluk Karamete
Post by Haluk Karamete
the code section that has the code instructions .. I'd like to be
able
Post by Nikola Nikolov
Post by Haluk Karamete
to
Post by Haluk Karamete
separate these two sections ( code and content ) from one another.
In other words, I'd like wp_texturize to do what's designed for on
the
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
"content-content" area in my shortcode but leave the "content-code"
section
Post by Haluk Karamete
alone..
If the <code></code> were to be preserved upon the visual-tab
switch, I
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
would be done with this issue and programming the parser now. But I
cannot
Post by Haluk Karamete
move on at this moment before I nail this issue in a future proof
way.
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
What do you think can be done to pull this wish off?
Post by Otto
That would be the wptexturize function.
http://codex.wordpress.org/Function_Reference/wptexturize
-Otto
On Mon, May 26, 2014 at 7:31 PM, Haluk Karamete <
Post by Haluk Karamete
This is a trickty one...
When I type in ' ( which is a simple single quote) in the content
area
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
in
Post by Haluk Karamete
my shortcode, I see that it ends up as a 'right single quotation
mark'
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
that
Post by Haluk Karamete
is &#8217;
That's observation #1.
It gets even more interesting, but when I put two of them, one
after
Post by Nikola Nikolov
Post by Haluk Karamete
the
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
other like this, ( '' ) , I ended up with &#8221; ( instead of
&#8217;&#8217;).
This is very confusing to me cause I'm middle of parsing my
structured
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
data
Post by Haluk Karamete
based shortcode. The content area interferes with me big time.
Could you tell me which WordPress function(s) involve here so
that a
Post by Nikola Nikolov
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
simple good old (') single quote ends up with &#8217;? Could you
point
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
me
Post by Haluk Karamete
the location where this is happening?
With that location, I'm hoping to see the complete view of what
other
Post by Haluk Karamete
Post by Haluk Karamete
Post by Otto
Post by Haluk Karamete
conversion are happening that my parser be aware of.
Thank you
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...