Skip to content

LinkOpenType - custom type #46

@mauryalamin

Description

@mauryalamin

Could be my inexperience, but I was hoping to use this new feature in the following way:

  1. I receive HTML content via an api
  2. The HTML contains links that I would like to open within my app, using it to display the content in my UI (not in any browser)
  3. Some of the links from this api come in weird formats like "<a href="/gary-busey/4005-1780/" data-ref-id="4005-1780">Gary Busey"
  4. I was planning to process the link using Regex to rewrite it and load the content in a new view in my app
  5. I tried some simple test code like:
.linkOpenType(.custom({ url in
      print(url)
 }))

but I'm getting the following messages in the Output window after clinking the link:

0x16e1300c0 - [PID=77634] WebProcessProxy::checkURLReceivedFromWebProcess: Received an unexpected URL from the web process
0x1060a9018 - [pageProxyID=14, webPageID=15, PID=77634] WebPageProxy::Ignoring request to load this main resource because it is outside the sandbox

If I click a traditional-looking link like:
<a href="https://api.site.com/gary-busey/4005-15789/\" data-ref-id="4005-15789">Gary Busey
My code will print the URL as expected.

Am I totally off base, trying to use the new feature in this way? If so, what's the intended use of this feature?

Thanks
Maury

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions