Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of shortcodes in manually entered descriptions #1035

Closed
wpsmort opened this issue Aug 4, 2017 · 13 comments

Comments

Projects
None yet
6 participants
@wpsmort
Copy link
Member

commented Aug 4, 2017

This was originally reported by a user in issue #943.

We attempted to resolve this in Version 2.3.15.

However, the solution caused a fatal timeout on many sites, see issue #1032 so we rolled back the changes.

We need to allow users to use brackets in manually entered SEO and OG Descriptions and leave auto generated descriptions alone.

@wpsmort wpsmort added this to the 2.3.16 milestone Aug 4, 2017

amostajo added a commit to amostajo/all-in-one-seo-pack that referenced this issue Aug 4, 2017

semperfiwebdesign#1035 Brackets preg_match is removed.
Line that was giving fatal and was striping bracket codes is removed.
Has been tested on local environment and one wp setup with 2.3.15 error.
@amostajo

This comment has been minimized.

Copy link
Contributor

commented Aug 4, 2017

@wpsmort I have removed the line that was replacing brackets as a whole.

I have tested this solution on the breaking WP that was mounted yesterday due to a little line in the regex related to this issue.

We might need extensive testing on this with more breaking environments.., I would suggest if there is a possibility of mounting more breaking environments from other users as well.

@michaeltorbert michaeltorbert modified the milestones: 2.3.17, 2.3.16 Aug 16, 2017

@michaeltorbert michaeltorbert changed the title Improve handling of shortcodes in auto generated descriptions Improve handling of shortcodes in manually entered descriptions Aug 16, 2017

@michaeltorbert

This comment has been minimized.

Copy link
Member

commented Aug 16, 2017

"we don't intend to change anything with autogenerated descriptions, we just want to fix a bug with outputting shortcodes manually entered in the SEO and OG description fields." - @wpsmort

@wpsmort

This comment has been minimized.

Copy link
Member Author

commented Aug 16, 2017

We should allow users to enter text that contains brackets in the SEO and OG description fields. Currently we strip out the brackets and anything inside them.

To test, manually enter an SEO and OG description that has brackets and check that this is correctly output in the source code.

Autogenerated Descriptions should be unaffected by this.

@wpsmort wpsmort modified the milestones: 2.3.17, 2.4 Sep 5, 2017

@wpsmort wpsmort assigned amostajo and unassigned wpsmort Sep 6, 2017

@wpsmort wpsmort removed the Needs Testing label Sep 6, 2017

@amostajo

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

@wpsmort Do this rule applies to titles as well?

I mean auto generated titles based on content or manually entered titles on SEO forms.

@amostajo

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

Also... if setting to "run shortcodes" is on, I am not wiping out brackets. What do you think?

@amostajo

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

Well. title always allows brackets.

amostajo added a commit to amostajo/all-in-one-seo-pack that referenced this issue Sep 20, 2017

semperfiwebdesign#1035 Brackets handling on manual/autogenerated desc…
…riptions.

semperfiwebdesign#1035 Changes tha handle brackets and shortcodes on manual and
autogenerated descriptions..
@amostajo

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

@wpsmort ready for testing

@wpsmort

This comment has been minimized.

Copy link
Member Author

commented Sep 25, 2017

@amostajo I tested PR #1039 and found one minor issue. The placeholder text in the OG Description field does not match what is output in the source code. This happens when you enter an SEO description with brackets and leave the OG description empty. In this instance, the OG description should be taken from the SEO description so the placeholder text should match exactly what's typed in the SEO description field. See screenshot:

screen shot 2017-09-25 at 4 20 49 pm

screen shot 2017-09-25 at 4 35 46 pm

@wpsmort wpsmort modified the milestones: 2.4, 2.5 Sep 27, 2017

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2017

@wpsmort @arnaudbroes WP considers any text within [ ] to be a shortcode, so is this minor issue a valid test case?

@dan-at-unkubed

This comment has been minimized.

Copy link

commented Jan 4, 2018

I went searching for some help with shortcodes inside of AIOSP fields, and I found this issue. Sounds like it's still in active development. Would it be possible to allow for the parsing of shortcodes within manual title and description fields? Might need a setting on the plugin options page to still allow for square brackets in these fields that don't get parsed for shortcodes. Probably defaulting in that direction, actually as that is the current functionality. Shortcodes are, after all, core Wordpress functionality. I'm trying to find a solution for when we want to update the current year in these seo fields without having to manually change every single one for hundreds of pages. Would be of significant help in this instance.

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2018

@michaeltorbert could you please comment on #1035 (comment)?

@michaeltorbert

This comment has been minimized.

Copy link
Member

commented Oct 9, 2018

WP considers any text within [] to be a shortcode, but, we're talking about manually entered descriptions. We need to assume that brackets manually entered in (OG) descriptions are meant to be brackets, not shortcodes.
Anyone with the edge case of wanting to run shortcodes in their manually entered descriptions should be using our description filter hooks.

michaeltorbert added a commit that referenced this issue Oct 9, 2018

@Garconis

This comment has been minimized.

Copy link

commented Oct 22, 2018

I think a simple "Allow shortcodes in descriptions?" would have been more ideal here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.