From f86ca5d7412a814fc80c33c5414372cb6d6b5a65 Mon Sep 17 00:00:00 2001 From: Eric Boehs Date: Fri, 18 Jul 2014 14:04:09 -0500 Subject: [PATCH] Properly set title Fixes #81 --- lib/assets/javascripts/_response.js.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/assets/javascripts/_response.js.coffee b/lib/assets/javascripts/_response.js.coffee index 548354d..f40dbcb 100644 --- a/lib/assets/javascripts/_response.js.coffee +++ b/lib/assets/javascripts/_response.js.coffee @@ -28,10 +28,8 @@ class Response @_title ?= @_extract_title() _extract_title: -> - if @_is_full_document_response() - $('title', @_get_doc()).text() - else - @xhr.getResponseHeader('X-Wiselinks-Title') + title_header = decodeURIComponent @xhr.getResponseHeader 'X-Wiselinks-Title' + $("

").html(title_header).text() || $('title', @_get_doc()).text() description: -> @_description ?= @_extract_description()