{"action":"opened","issue":{"url":"https://api.github.com/repos/gnotaras/wordpress-add-meta-tags/issues/9","labels_url":"https://api.github.com/repos/gnotaras/wordpress-add-meta-tags/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/gnotaras/wordpress-add-meta-tags/issues/9/comments","events_url":"https://api.github.com/repos/gnotaras/wordpress-add-meta-tags/issues/9/events","html_url":"https://github.com/gnotaras/wordpress-add-meta-tags/issues/9","id":116099217,"number":9,"title":"Shortcode tags in automatically generated descriptions","user":{"login":"chesio","id":2021167,"avatar_url":"https://avatars.githubusercontent.com/u/2021167?v=3","gravatar_id":"","url":"https://api.github.com/users/chesio","html_url":"https://github.com/chesio","followers_url":"https://api.github.com/users/chesio/followers","following_url":"https://api.github.com/users/chesio/following{/other_user}","gists_url":"https://api.github.com/users/chesio/gists{/gist_id}","starred_url":"https://api.github.com/users/chesio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesio/subscriptions","organizations_url":"https://api.github.com/users/chesio/orgs","repos_url":"https://api.github.com/users/chesio/repos","events_url":"https://api.github.com/users/chesio/events{/privacy}","received_events_url":"https://api.github.com/users/chesio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T12:41:20Z","updated_at":"2015-11-10T12:41:20Z","closed_at":null,"body":"Hi George,\r\n\r\nI'd like to resolve one of TODO items in your code ;) More precisely, I'd like to follow up the issue we already discussed at WP forums: https://wordpress.org/support/topic/shortcode-tags-in-automatically-generated-descriptions\r\n\r\nI found out that function `amt_get_the_excerpt` still can produce description with shortcode in it if generated excerpt (content of `$amt_excerpt` variable) is shorter than average description length and [\"nasty hack\"](https://github.com/gnotaras/wordpress-add-meta-tags/blob/master/amt-utils.php#L300) kicks in. The problem is that \"nasty hack\" produces **new excerpt from raw post content** - such excerpt is processed via `amt_sanitize_description` [function](https://github.com/gnotaras/wordpress-add-meta-tags/blob/master/amt-utils.php#L123), but as this function only cleans double quotes by default, shortcode is not removed.\r\n\r\nHowever, you seem to [be aware that it might be not enough](https://github.com/gnotaras/wordpress-add-meta-tags/blob/master/amt-utils.php#L129). Well, now you know the answer is negative :) At least unless you re-implement or remove \"nasty hack\".\r\n\r\nBtw. thanks for investigating the issue while on WP forums!\r\n\r\nAll the best,\r\nČeslav"}}