簡體   English   中英

是否可以為 Apple News 解析 URL 中的特殊字符?

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

我在一個正文段落中有一篇帶有 URL 的文章,帶有“[”和“[”(特殊字符)。 Apple News 在他們的文檔中說你可以用''解析特殊字符,但是當我添加它時,News Preview App 說這是一個格式錯誤的 JSON 文檔。 如果我保留 URL 不變,則錯誤將變為無效的 URL。 有可能解決這個問題嗎?

蘋果新聞文檔 => 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

錯誤

只需對未接受的字符進行編碼,例如:'[' = '%5B'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM