File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
plugins/domains/tumblr.com Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ export default {
2626 tumblr_post . photos . forEach ( function ( photo ) {
2727
2828 var title = photo . caption || tumblr_post . caption ;
29- // TODO: fix using cheerio
30- title = cheerio ( '<div>' ) . html ( title ) . text ( ) ;
29+ title = cheerio . load ( title ) . text ( ) ;
3130 if ( title && title . length > 160 ) {
3231 title = title . split ( / [ . , ! ? ] / ) [ 0 ] ;
3332 }
Original file line number Diff line number Diff line change @@ -24,12 +24,9 @@ export default {
2424
2525 var p = tumblr_post . player instanceof Array ? tumblr_post . player [ 0 ] : tumblr_post . player ;
2626
27- // TODO: fix using cheerio
28- var $c = cheerio ( '<div>' ) . append ( p . embed_code ) ;
29- var $iframe = $c . find ( 'iframe' ) ;
27+ var $iframe = cheerio . load ( p . embed_code ) ( 'iframe' ) ;
3028
3129 if ( $iframe . length ) {
32-
3330 return {
3431 __promoUri : {
3532 url : $iframe . attr ( 'src' ) ,
You can’t perform that action at this time.
0 commit comments