-
Notifications
You must be signed in to change notification settings - Fork 71
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
How to remove HTML from "article document title" before submitting to Apple News? #1191
Comments
@newvision2112 you should be able to use the apple_news_exporter_title filter |
@mogmarsh Thank you. So when I remove HTML tags on that:
It removes the html from ALL titles in the JSON. So it looks like we lose the ability to have italics tags in live article headline that people read in Apple News. Is there a way to only have the HTML removed from the "article document title"? But leave it in the regular title that shows up with the story on Apple News? |
@newvision2112 The apple_news_generate_json filter should work. It gives you an array representation of the json, so you would just change |
@newvision2112 also, the tags should already be stripped:
|
@mogmarsh Thank you. I will work on apple_news_generate_json filter. I saw that code in the plugin Apple News flagged the problem to us and halted our site going live until we fix it. |
You're right, this is a bug. I was able to reproduce this on a vanilla installation of the plugin. It appears that the HTML in the title is getting partially transformed which is interfering with strip tags, which results in this output: "title": "Test <i>italic title<\/i>" |
Thank you Kevin! Please let me know if I can test anything, or what a timeline for the fix might be. |
@newvision2112 My suggestion above should work until we get the bug fixed. That filter runs at the very last minute and allows you to change almost anything. |
@mogmarsh Thank you, but I don't understand the code enough to use apple_news_generate_json. For now, to get Apple News to approve us, I used the code above to strip all html from all titles |
Description of the bug
We are submitting our draft articles to Apple News. The issue is our post titles need to italicize names of magazines and newspapers so we have
<I></I>
and<em></em>
tags in the title text. This works for WordPress showing the title on our website.But, it turns out Apple News will not accept "article document title" with HTML in them. This is not the title of the article that shows in Apple News.
How do I configure the plugin strip the HTML characters from the "article document title" before submitting the JSON to Apple News?
The text was updated successfully, but these errors were encountered: