• Resolved Conners Hua

    (@connershua)


    When using a custom URI scheme (e.g., macappstores://) in a Markdown link, the plugin incorrectly rewrites it as an https:// URL. This causes the link to open in a web browser instead of launching the intended native application (in this case, the Mac App Store).

    Steps to Reproduce

    1. Add the following Markdown link to a document: [Mac App Store Link](macappstores://apps.apple.com/cn/app/macos-sequoia/id6596773750?mt=12)
    2. Render or click the link.
    3. Actual behavior: The link is converted to
      https://apps.apple.com/cn/app/macos-sequoia/id6596773750?mt=12
      and opens in a browser.
    4. Expected behavior: The original URI scheme should be preserved:
      macappstores://apps.apple.com/cn/app/macos-sequoia/id6596773750?mt=12,
      so that clicking it triggers the Mac App Store app via the system URL handler.
    • This topic was modified 6 months, 4 weeks ago by Conners Hua.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    👋 @connershua,

    Fixed with the new version 3.23.0. 🥳 Actually it’s related to WordPress security features. I added the missing protocols to the white list, you can do it on your own with this kind of snippet for example :

    add_filter( 'kses_allowed_protocols', ( $protocols ) {
    $protocols[] = 'macappstores'; // Add the 'macappstores' protocol
    return $protocols;
    });

    As other users may want to use those links, it’s nice to make it available by default. Feel free to open new topics in the future and I will update the white list when needed.

    Kind regards,

    Peter

    Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    @connershua I hope this message finds you well.

    I haven’t heard from you for a while and I guess everything worked out so far for you so I’m gonna close this discussion. Free free to open a new one if need be.

    Kinds Regards,

    Peter

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.