Skip to content

Commit

Permalink
Merge pull request #332 from Codeinwp/development
Browse files Browse the repository at this point in the history
Scrub item titles for HTML entities
Fix widget to use all settings configured
Fix issue with saving description length
  • Loading branch information
contactashish13 authored Nov 30, 2019
2 parents d770c93 + 0f355cc commit 6e26cd4
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion css/feedzy-rss-feeds.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* feedzy-rss-feeds.css
* Feedzy RSS Feed
* Copyright: (c) 2016 Themeisle, themeisle.com
* Version: 3.3.12
* Version: 3.3.13
* Plugin Name: FEEDZY RSS Feeds
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
* Author: Themeisle
Expand Down
4 changes: 2 additions & 2 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"env": {
"shortcode": "[feedzy-rss feeds='https://s3.amazonaws.com/downloads.themeisle.com/sample-feed.xml' max='10' feed_title='yes' refresh='1_hours' meta='yes' summary='yes' price='yes' mapping='price=im:price' thumb='yes' keywords_title='God, Mendes, Cyrus' keywords_ban='Cyrus' template='style1']"
},
"projectId": "vj4ftg",
"videoUploadOnPasses": false
"videoUploadOnPasses": false,
"projectId": "frqcxp"
}
2 changes: 1 addition & 1 deletion feedzy-rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: Feedzy RSS Feeds Lite
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
* Version: 3.3.12
* Version: 3.3.13
* Author: Themeisle
* Author URI: http://themeisle.com
* License: GPL-2.0+
Expand Down
7 changes: 6 additions & 1 deletion form/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="pragma" content="no-cache"/>
<link rel="stylesheet" href="<?php echo FEEDZY_ABSURL . 'css/form.css?h=' . date( 'dmYHis' ); ?>" type="text/css" media="all"/>
<link rel="stylesheet" href="
<?php
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
echo FEEDZY_ABSURL . 'css/form.css?h=' . date( 'dmYHis' );
?>
" type="text/css" media="all"/>
</head>
<body>
<div class="feedzy-popup-form container">
Expand Down
4 changes: 2 additions & 2 deletions includes/abstract/feedzy-rss-feeds-admin-abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ public function sanitize_attr( $sc, $feed_url ) {
$sc['keywords_ban'] = rtrim( $sc['keywords_ban'], ',' );
$sc['keywords_ban'] = array_map( 'trim', explode( ',', $sc['keywords_ban'] ) );
}
if ( ! empty( $sc['summarylength'] ) && ! ctype_digit( $sc['summarylength'] ) ) {
if ( ! empty( $sc['summarylength'] ) && ( ! ctype_digit( $sc['summarylength'] ) && ! is_numeric( $sc['summarylength'] ) ) ) {
$sc['summarylength'] = '';
}
if ( empty( $sc['default'] ) ) {
Expand Down Expand Up @@ -934,7 +934,7 @@ private function get_feed_item_filter( $sc, $sizes, $item, $feed_url, $index ) {
}
$content_thumb = apply_filters( 'feedzy_thumb_output', $content_thumb, $feed_url, $sizes, $item );
}
$content_title = $item->get_title();
$content_title = html_entity_decode( $item->get_title(), ENT_QUOTES, 'UTF-8' );
if ( is_numeric( $sc['title'] ) ) {
$length = intval( $sc['title'] );
if ( $length > 0 && strlen( $content_title ) > $length ) {
Expand Down
4 changes: 4 additions & 0 deletions includes/admin/feedzy-wp-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ public function widget( $args, $instance ) {
'keywords_title' => $instance['keywords_title'],
'keywords_ban' => $instance['keywords_ban'],
'error_empty' => $instance['error_empty'],
'sort' => $instance['sort'],
'refresh' => $instance['refresh'],
'follow' => $instance['follow'],
'http' => $instance['http'],
);
$feedzy_widget_shortcode_attributes = apply_filters( 'feedzy_widget_shortcode_attributes_filter', $feedzy_widget_shortcode_attributes, $args, $instance );

Expand Down
2 changes: 1 addition & 1 deletion includes/feedzy-rss-feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function instance() {
*/
public function init() {
self::$plugin_name = 'feedzy-rss-feeds';
self::$version = '3.3.12';
self::$version = '3.3.13';
self::$instance->load_dependencies();
self::$instance->set_locale();
self::$instance->define_admin_hooks();
Expand Down
4 changes: 2 additions & 2 deletions includes/gutenberg/build/block.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions includes/gutenberg/src/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default registerBlockType( 'feedzy-rss-feeds/feedzy-block', {
props.setAttributes( { target: value } );
};
const onTitle = value => {
props.setAttributes( { title: value } );
props.setAttributes( { title: Number( value ) } );
};
const changeMeta = value => {
props.setAttributes( { metafields: value } );
Expand All @@ -71,7 +71,7 @@ export default registerBlockType( 'feedzy-rss-feeds/feedzy-block', {
props.setAttributes( { summary: ! props.attributes.summary } );
};
const onSummaryLength = value => {
props.setAttributes( { summarylength: value } );
props.setAttributes( { summarylength: Number( value ) } );
};
const onKeywordsTitle = value => {
props.setAttributes( { keywords_title: value } );
Expand All @@ -86,7 +86,7 @@ export default registerBlockType( 'feedzy-rss-feeds/feedzy-block', {
props.setAttributes( { default: value } );
};
const onSize = value => {
props.setAttributes( { size: value } );
props.setAttributes( { size: Number( value ) } );
};
const onReferralURL = value => {
props.setAttributes( { referral_url: value } );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedzy-rss-feeds",
"version": "3.3.12",
"version": "3.3.13",
"description": "Feedzy RSS Feeds - lite version",
"repository": {
"type": "git",
Expand Down

0 comments on commit 6e26cd4

Please sign in to comment.