PinDroid icon indicating copy to clipboard operation
PinDroid copied to clipboard

Title parsing broken

Open gazoza opened this issue 6 years ago • 0 comments

Page title parsing sometimes generates garbage or it fails to populate any title. Examples:

  1. Attempting to bookmark https://mobile.nytimes.com/2018/04/17/business/economy/california-housing.html results in the following title in PinDroid:
YPE html> window.NYT_ENVIRONMENT = 'prd'; window.NYT_RELEASE = 'c210a96f06f7549ffa92934d5d2e2f5e5bddea9a'; window.JKIDD_PATH = 'https://a.nytimes.com/svc/nyt/data-layer'; window.WEDDINGS_PATH = 'https://content.api.nytimes.com'; window.SENTRY_SAMPLE_RATE = 10; if (document.location.search.indexOf('nytapp=true') > -1) document.documentElement.classList.add('NYTApp'); 100*Math.random()<=window.SENTRY_SAMPLE_RATE?(window.INSTALL_RAVEN=!0,window.nyt_errors={ravenInstalled:!1,list:[],tags:[]},window.onerror=function(r,n,o,w,t){var t=new Error(r,n,o,w,t);if(!window.nyt_errors.ravenInstalled){const d={err:t,data:{}};window.nyt_errors.list.push(d)}}):window.INSTALL_RAVEN=!1; California Lawmakers Kill Housing Bill After Fierce Debate - The New York Times
  1. Bookmarking https://howlongtobeat.com/ results in an empty title because parsing fails.

Empty titles [2] are a lot more widespread than garbled titles [1].

gazoza avatar Apr 27 '18 06:04 gazoza