urlsyntax-errorapple-news

Is possible to parse specials characters in an URL for Apple News?


I have an article with an URL in one body paragraph, with '[' and '[' (special characters). Apple News in their documentation said that you can parse special characters with '', but when I add it the News Preview App said that is a malformed JSON document. If I leave the URL as it, the error changes to an invalid URL. Is it possible to fix this?

Apple News Documentation => https://developer.apple.com/documentation/apple_news/apple_news_format/components/using_html_with_apple_news_format

Error: "URL" was "http://www.example.letter[1].pdf" should be valid URL with one of ["http","https","#","webcal","stocks","action"] scheme(s)
document.components[3].additions[0].URL

Error


Solution

  • Just encode the unaccepted characters, for example: '[' = '%5B'