diff --git a/Controllers/PF_Readability.php b/Controllers/PF_Readability.php index 99e59f079..411deaf3d 100644 --- a/Controllers/PF_Readability.php +++ b/Controllers/PF_Readability.php @@ -28,8 +28,9 @@ public function get_readable_text( $args ) { $url = pressforward( 'controller.http_tools' )->resolve_full_url( $url ); // var_dump($url); die(); $descrip = rawurldecode( $descrip ); - if ( get_magic_quotes_gpc() ) { - $descrip = stripslashes( $descrip ); } + if ( false !== strpos( $descrip, '\\' ) ) { + $descrip = stripslashes( $descrip ); + } if ( $authorship == 'aggregation' ) { $aggregated = true; diff --git a/Libraries/PFSimpleHtmlDom.php b/Libraries/PFSimpleHtmlDom.php index 0b73d6b4a..cfd26bb73 100644 --- a/Libraries/PFSimpleHtmlDom.php +++ b/Libraries/PFSimpleHtmlDom.php @@ -578,7 +578,7 @@ protected function parse_selector( $selector_string ) { // This implies that an html attribute specifier may start with an @ sign that is NOT captured by the expression. // farther study is required to determine of this should be documented or removed. // $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; - $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; + $pattern = "/([\w\-:\*]*)(?:\#([\w\-]+)|\.([\w\-]+))?(?:\[@?(!?[\w\-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is"; preg_match_all( $pattern, trim( $selector_string ) . ' ', $matches, PREG_SET_ORDER ); if ( is_object( $debugObject ) ) {$debugObject->debugLog( 2, 'Matches Array: ', $matches );} @@ -1073,7 +1073,7 @@ protected function read_tag() { return true; } - if ( ! preg_match( '/^[\w-:]+$/', $tag ) ) { + if ( ! preg_match( '/^[\w\-:]+$/', $tag ) ) { $node->_[ PF_HDOM_INFO_TEXT ] = '<' . $tag . $this->copy_until( '<>' ); if ( $this->char === '<' ) { $this->link_nodes( $node, false ); diff --git a/includes/functions.php b/includes/functions.php index 9b3674dab..28e27b14c 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -422,6 +422,9 @@ function pf_prep_item_for_submit( $item ) { } if ( is_array( $itemPart ) ) { + if ( 'nominators' === $itemKey ) { + $itemPart = array_keys( $itemPart ); + } $itemPart = implode( ',',$itemPart ); }