diff --git a/WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailCoordinator.swift b/WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailCoordinator.swift index 5e1b77d62136..742746811bc6 100644 --- a/WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailCoordinator.swift +++ b/WordPress/Classes/ViewRelated/Reader/Detail/ReaderDetailCoordinator.swift @@ -281,6 +281,7 @@ class ReaderDetailCoordinator { /// Given a URL presents it the best way possible. /// /// If it's an image, shows it fullscreen. + /// If it's a fullscreen Story link, open it in the webview controller /// If it's a post, open a new detail screen. /// If it's a regular URL, open it in the webview controller /// @@ -290,6 +291,8 @@ class ReaderDetailCoordinator { view?.scroll(to: hash) } else if url.pathExtension.contains("gif") || url.pathExtension.contains("jpg") || url.pathExtension.contains("jpeg") || url.pathExtension.contains("png") { presentImage(url) + } else if url.query?.contains("wp-story") ?? false { + presentWebViewController(url) } else if readerLinkRouter.canHandle(url: url) { readerLinkRouter.handle(url: url, shouldTrack: false, source: viewController) } else if url.isWordPressDotComPost { diff --git a/WordPress/Classes/ViewRelated/Reader/Detail/WebView/ReaderWebView.swift b/WordPress/Classes/ViewRelated/Reader/Detail/WebView/ReaderWebView.swift index 7b1bc923ca7e..056e97899a70 100644 --- a/WordPress/Classes/ViewRelated/Reader/Detail/WebView/ReaderWebView.swift +++ b/WordPress/Classes/ViewRelated/Reader/Detail/WebView/ReaderWebView.swift @@ -70,7 +70,10 @@ class ReaderWebView: WKWebView { }) // Make all images tappable - document.querySelectorAll('img').forEach((el) => { el.outerHTML = `${el.outerHTML}` }) + // Exception for images in Stories, which have their own link structure + document.querySelectorAll('img:not(.wp-story-image)').forEach((el) => { + el.outerHTML = `${el.outerHTML}` + }) // Only display images after they have fully loaded, to have a native feel document.querySelectorAll('img').forEach((el) => {