I am grabbing a URL's content, extracting the html via
wkWebView.evaluateJavaScript("document.documentElement.outerHTML.toString()", completionHandler: { (html1: Any?, error: Error?)
then later firing up a WKWebview, with a base url to match the source of the URL above. With a nil baseURL, the web view displays properly but links are dead due to blank url (about:blank#! is the prefix to every link). Adding the correct base url results in almost correct link but with "... .com/#!/... " prefix. I can copy that incorrect url, edit out the '/#!' and it works.
The question: why is this getting added? I would guess i can override each request before it gets processed, intercept the link and update it, but have never done this, but would prefer to find out why the #! even gets added in the first place.
Thanks for any tips!