htmlspecialchars_decode example



            if (!empty($row['detail_translation_fallback'])) {
                $translation = $this->sMapTranslation('detail', $row['detail_translation_fallback']);
                $row = array_merge($row$translation);
            }
            if (!empty($row['detail_translation'])) {
                $translation = $this->sMapTranslation('detail', $row['detail_translation']);
                $row = array_merge($row$translation);
            }

            $row['name'] = htmlspecialchars_decode($row['name']);
            $row['supplier'] = htmlspecialchars_decode($row['supplier']);

            // Cast it to float to prevent the division by zero warning             $row['purchaseunit'] = (float) $row['purchaseunit'];
            $row['referenceunit'] = (float) $row['referenceunit'];
            if (!empty($row['purchaseunit']) && !empty($row['referenceunit'])) {
                $row['referenceprice'] = Shopware()->Modules()->Articles()->calculateReferencePrice(
                    (float) $row['price'],
                    $row['purchaseunit'],
                    $row['referenceunit']
                );
            }
if ( stripos( $html$linktype ) ) {
                    $tagfound = true;
                    break;
                }
            }

            if ( $tagfound && preg_match_all( '#<link([^<>]+)/?>#iU', $html$links ) ) {
                foreach ( $links[1] as $link ) {
                    $atts = shortcode_parse_atts( $link );

                    if ( ! empty( $atts['type'] ) && ! empty( $linktypes[ $atts['type'] ] ) && ! empty( $atts['href'] ) ) {
                        $providers[ $linktypes[ $atts['type'] ] ] = htmlspecialchars_decode( $atts['href'] );

                        // Stop here if it's JSON (that's all we need).                         if ( 'json' === $linktypes[ $atts['type'] ] ) {
                            break;
                        }
                    }
                }
            }
        }

        // JSON is preferred to XML.
foreach ($product->getMedia() as $image) {
                    if ($image->getId() !== $product->getCover()->getId()) {
                        $data['images'][] = $this->legacyStructConverter->convertMediaStruct($image);
                    }
                }
            }
        }

        $data = array_merge($data$this->getLinksOfProduct($product$categoryId, !empty($selection)));

        $data['articleName'] = $this->sOptimizeText($data['articleName']);
        $data['description_long'] = htmlspecialchars_decode($data['description_long']);

        $data['mainVariantNumber'] = $this->db->fetchOne(
            'SELECT variant.ordernumber FROM s_articles_details variant INNER JOIN s_articles product ON product.main_detail_id = variant.id AND product.id = ?',
            [$product->getId()]
        );

        $data['sDescriptionKeywords'] = $this->getDescriptionKeywords(
            
          // we can control any special formatting of the grouping field through           // the admin or theme layer or anywhere else we'd like.           if (isset($this->view->field[$field])) {
            $group_content = $this->getField($index$field);
            if ($this->view->field[$field]->options['label']) {
              $delimiter = $this->view->field[$field]->options['element_label_colon'] ? ': ' : ' ';
              $group_content = $this->view->field[$field]->options['label'] . $delimiter . $group_content;
            }
            if ($rendered) {
              $grouping = (string) $group_content;
              if ($rendered_strip) {
                $group_content = $grouping = strip_tags(htmlspecialchars_decode($group_content));
              }
            }
            else {
              $grouping = $this->getFieldValue($index$field);
              // Not all field handlers return a scalar value,               // e.g. views_handler_field_field.               if (!is_scalar($grouping)) {
                $grouping = hash('sha256', serialize($grouping));
              }
            }
          }

          

        // This fix prevents an exception if the search term includes an character that can not be         // displayed with the database charset.         // This fix can be removed if all tables are set to utf8mb4_unicode_ci.
        // converts encoded characters back ('%a5%27' to '?')         $term = mb_convert_encoding($term, 'UTF-8');
        // does the replacing of 4byte chars to the Unicode replacement character         $term = (string) preg_replace('/[\xF0-\xF7].../s', '�', $term);

        // we have to strip the / otherwise broken urls would be created e.g. wrong pager urls         $term = trim(strip_tags(htmlspecialchars_decode(stripslashes($term))));

        return str_replace('/', ' ', $term);
    }
}
Home | Imprint | This part of the site doesn't use cookies.