Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded metadata translator puts CSS/javascript in author field (and emails too) #2117

Closed
mvolz opened this issue Feb 11, 2020 · 1 comment · Fixed by #2122
Closed

Embedded metadata translator puts CSS/javascript in author field (and emails too) #2117

mvolz opened this issue Feb 11, 2020 · 1 comment · Fixed by #2122

Comments

@mvolz
Copy link
Contributor

mvolz commented Feb 11, 2020

Would it be possible for the embedded metadata translator to process the author tags to remove these?

Examples:

curl -d 'https://www.milliyet.com.tr/gundem/canan-dagdeviren-kimdir-2392696' -H 'Content-Type: text/plain' http://127.0.0.1:1969/web

gives the results

[{"key":"F4KIRRQ3","version":0,"itemType":"webpage","creators":[{"firstName":"player-inline {display: inline-block;padding-bottom: 56 25%;position: relative;width: 100%;z-index: 5;} player-box {height: 100%;left: 0;position: absolute;top: 0;width: 100%;}$ ready{quarkPlayer = new","lastName":"QuarkPlayer","creatorType":"author"},{"name":"bufferLength:5","creatorType":"author"},{"firstName":"autoPlay:","lastName":"false","creatorType":"author"},{"firstName":"subTitles:","lastName":"false","creatorType":"author"},{"firstName":"showAds:","lastName":"true","creatorType":"author"},{"firstName":"showNotification:","lastName":"false","creatorType":"author"},{"name":"showB","creatorType":"author"},{"firstName":"widthSelector:","lastName":"true","creatorType":"author"},{"firstName":"customMenu:","lastName":"false","creatorType":"author"},{"name":"Preload: 'None'","creatorType":"author"},{"firstName":"Playsinline:","lastName":"True","creatorType":"author"},{"firstName":"Live:","lastName":"False","creatorType":"author"},{"name":"Poster: 'Https://I2.milimaj.com/I/Milliyet/75/800x450/5e4231ac55427f1b70cf438a.jpg'","creatorType":"author"},{"name":"sources:","creatorType":"author"},{"name":"playType: \"newsdetail\"","creatorType":"author"},{"name":"adTags","creatorType":"author"},{"name":"cust_params=keyword%3dVid_duration_1_3%2cVid_pubdate_new%2cseeding_false%2cautoplay_false%2csilentstart_false%2cst_none%2cpremium_video%26contentid%3d6142190%26kategori%3dml_mtv_milliyet-tv_haberler%26catlist%3dc1_milliyet-tv%2cc2_haberler%2cCct_sivas%2cCct_soguk-hava%2cCct_sicak-su%2cCct_buz%2cct_sivas%2cct_soguk-hava%2cct_sicak-su%2cct_buz%26pub_name%3dmilliyet","creatorType":"author"},{"name":"vpos=preroll\"}","creatorType":"author"},{"name":"{\"id\":\"overlay\"","creatorType":"author"},{"name":"\"offset\":\"00:00:05.000\"","creatorType":"author"},{"name":"\"type\":\"nonlinear\"","creatorType":"author"},{"name":"\"url\":\"https://pubads.g.doubleclick.net/gampad/ads?sz=640x360","creatorType":"author"},{"name":"iu=/9927946/milliyet/sitegeneli/overlay","creatorType":"author"},{"name":"impl=s","creatorType":"author"},{"name":"gdfp_req=1","creatorType":"author"},{"name":"env=vp","creatorType":"author"},{"name":"output=vast","creatorType":"author"},{"name":"unviewed_position_start=1","creatorType":"author"},{"name":"url=https://www.milliyet.com.tr/gundem/canan-dagdeviren-kimdir-2392696","creatorType":"author"},{"name":"description_url=http%3a%2f%2fwww.milliyet.com.tr%2fgundem%2fcanan-dagdeviren-kimdir-2392696","creatorType":"author"},{"name":"correlator=","creatorType":"author"},{"name":"cust_params=keyword%3dVid_duration_1_3%2cVid_pubdate_new%2cseeding_false%2cautoplay_false%2csilentstart_false%2cst_none%2cpremium_video%26contentid%3d6142190%26kategori%3dml_mtv_milliyet-tv_haberler%26catlist%3dc1_milliyet-tv%2cc2_haberler%2cCct_sivas%2cCct_soguk-hava%2cCct_sicak-su%2cCct_buz%2cct_sivas%2cct_soguk-hava%2cct_sicak-su%2cct_buz%26pub_name%3dmilliyet","creatorType":"author"},{"name":"vpos=overlay","creatorType":"author"},{"name":"overlay=1\"}","creatorType":"author"},{"name":"{\"id\":\"postroll\"","creatorType":"author"},{"name":"\"offset\":\"end\"","creatorType":"author"},{"name":"\"type\":\"linear\"","creatorType":"author"},{"name":"\"url\":\"https://pubads.g.doubleclick.net/gampad/ads?sz=640x360","creatorType":"author"},{"name":"iu=/9927946/milliyet/sitegeneli/postroll","creatorType":"author"},{"name":"impl=s","creatorType":"author"},{"name":"gdfp_req=1","creatorType":"author"},{"name":"env=vp","creatorType":"author"},{"name":"output=vast","creatorType":"author"},{"name":"unviewed_position_start=1","creatorType":"author"},{"name":"url=https://www.milliyet.com.tr/gundem/canan-dagdeviren-kimdir-2392696","creatorType":"author"},{"name":"description_url=http%3a%2f%2fwww.milliyet.com.tr%2fgundem%2fcanan-dagdeviren-kimdir-2392696","creatorType":"author"},{"name":"correlator=","creatorType":"author"},{"name":"cust_params=keyword%3dVid_duration_1_3%2cVid_pubdate_new%2cseeding_false%2cautoplay_false%2csilentstart_false%2cst_none%2cpremium_video%26contentid%3d6142190%26kategori%3dml_mtv_milliyet-tv_haberler%26catlist%3dc1_milliyet-tv%2cc2_haberler%2cCct_sivas%2cCct_soguk-hava%2cCct_sicak-su%2cCct_buz%2cct_sivas%2cct_soguk-hava%2cct_sicak-su%2cct_buz%26pub_name%3dmilliyet","creatorType":"author"},{"name":"vpos=postroll\"}]","creatorType":"author"},{"name":"plugins:","creatorType":"author"},{"name":"stats: {gemius: {identifier: 'bIFA4t.SzzEb53fr9ZSQl2ZVzQXZZ4NyqW0wgJzlvwb.e7'}","creatorType":"author"},{"name":"Clicks: {portal: \"Webtv\"","creatorType":"author"},{"name":"Action: \"Video\"","creatorType":"author"},{"firstName":"pathname: \"O ilimizde hava eksi 21 dereceyi gördü! Hayat buz kesti | Haberler |","lastName":"sivas","creatorType":"author"},{"firstName":"Soğuk","lastName":"Hava","creatorType":"author"},{"firstName":"Sıcak","lastName":"Su","creatorType":"author"},{"firstName":"Buz | 117 |","lastName":"Newsdetail\"","creatorType":"author"},{"name":"newsCategory : '/milliyet-tv/haberler/'","creatorType":"author"},{"name":"Base_url: 'Https://Www.milliyet.com.tr/Milliyet-Tv/O-Ilimizde-Hava-Eksi-21-Dereceyi-Gordu-Hayat-Buz-Kesti-6142190'}","creatorType":"author"},{"name":"Bluekai: {}}","creatorType":"author"},{"firstName":"htvThumbnails: {showThumbnail:","lastName":"false","creatorType":"author"},{"name":"thumbnailUrl : '//videocdn.milliyet.com.tr/2020/02/11/mtv_6142190_thmb.jpg'","creatorType":"author"},{"name":"thumbnailWidth: '128'","creatorType":"author"},{"name":"thumbnailHeight: '72'}","creatorType":"author"},{"firstName":"hotkeys: {enableVolumeScroll:","lastName":"false}","creatorType":"author"},{"firstName":"suggestedVideos: {showSuggestedVideos:","lastName":"true","creatorType":"author"},{"name":"nextVideoSummonTime:7","creatorType":"author"},{"name":"autoNextSuggestedVideos:false","creatorType":"author"},{"firstName":"suggestedVideoList: null}});});O ilimizde hava eksi 21 dereceyi gördü! Hayat buz kestiSivas'ta gece saatlerinde termometreler eksi 21 dereceyi gösterdi Havaya serpilen sıcak su yere buz taneciği olarak düştü Sivas'ta günlerdir etkisini sürdüren soğuk hava gece yarısı eksi 21 dereceye düştü Hayat adeta buz","lastName":"kesti","creatorType":"author"},{"firstName":"Caddeler Tamamen Boşaldı daha Fazla Video","lastName":"Için","creatorType":"author"}],"tags":[],"title":"Canan Dağdeviren kimdir?","websiteTitle":"Milliyet","url":"https://www.milliyet.com.tr/gundem/canan-dagdeviren-kimdir-2392696","abstractNote":"Canan Dağdeviren kimdir? Dünyanın en iyi akademisyenlerini Boğaziçi Lectures kapsamında konuşmacı olarak misafir edecek olan Boğaziçi Üniversitesi Giyilebilir kalp pilinin mucidi Dr. Canan Dağdeviren'i konuk ediyor. Bilimsel anlamda birçok başarıya imza atan Canan Dağdeviren aynı zamanda Forbes dergisinin 30 yaş altı Bilim insanı listesinde de yer alıyor","language":"tr","accessDate":"2020-02-11T12:25:16Z"}]

And for email (a less serious issue!):

'curl -d 'https://www.themonthly.com.au/issue/2010/february/1329283585/louis-nowra/better-self' -H 'Content-Type: text/plain' http://127.0.0.1:1969/web'

[{"key":"S7NPLEXD","version":0,"itemType":"webpage","creators":[{"name":"developer@themonthly.com.au","creatorType":"author"}],"tags":[],"title":"The better self?","websiteTitle":"The Monthly","date":"2010-02-25T11:00:00+11:00","url":"https://www.themonthly.com.au/issue/2010/february/1329283585/louis-nowra/better-self","abstractNote":"Germaine Greer and ‘The Female Eunuch’","websiteType":"Text","language":"en","accessDate":"2020-02-11T12:37:01Z","extra":"DOI: https://www.themonthly.com.au/issue/2010/february/1329283585/louis-nowra/better-self"}]
@dstillman
Copy link
Member

#2122 will remove most of the junk in the first example.

The email one isn't a bug. Zotero is simply using the value of dcterms.creator, which the site has set to that email address. It's on the site to set that to something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants