diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-04 07:48:59 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-04 07:48:59 -0600 |
| commit | aa0864f87d74b562384205df2264b5449fdb38cc (patch) | |
| tree | 3d7120f414d18ea028574015185044138938b1f1 /src | |
| parent | c42c0b65b0c95665d5dbec011dd3d61458af2054 (diff) | |
| download | invidious-aa0864f87d74b562384205df2264b5449fdb38cc.tar.gz invidious-aa0864f87d74b562384205df2264b5449fdb38cc.tar.bz2 invidious-aa0864f87d74b562384205df2264b5449fdb38cc.zip | |
Don't redirect youtube links
Diffstat (limited to 'src')
| -rw-r--r-- | src/helpers.cr | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/helpers.cr b/src/helpers.cr index 9b79c27e..1492e7cc 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -287,19 +287,6 @@ def template_comments(root) author = child["data"]["author"] score = child["data"]["score"] body_html = HTML.unescape(child["data"]["body_html"].as_s) - body_html = XML.parse_html(body_html) - - body_html.xpath_nodes(%q(//a/@href)).each do |match| - uri = URI.parse(match.content) - - if uri.host =~ /(www\.)?youtube.com/ && uri.path == "/watch" - uri = uri.full_path - end - - match.content = uri.to_s - end - - body_html = body_html.to_s replies_html = "" if child["data"]["replies"] != "" |
