<commit_before><script>
    $(function() {
        var queryParameters = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m;
        while (m = re.exec(queryString)) {
            queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
        }
        $("#filter-block input[data-filter=brands]").on("change", function(e) {
            queryParameters['brands'] = $(this).val();
            location.search = $.param(queryParameters);
        });

        $("#filter-block input[data-filter=price]").on("change", function(e) {
            queryParameters['price'] = $(this).val();
            location.search = $.param(queryParameters);
        });

        $("#filter-block input[data-filter=quality]").on("change", function(e) {
            queryParameters['quality'] = $(this).val();
            location.search = $.param(queryParameters);
        });
    });
</script>
<div class="row">
    <div class="col-xs-12 col-sm-3">
        <br/>
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="col-xs-12">
                <div class="well well-small" id="filter-block">
                    <form action="/search">
                        <legend>Brands</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Brand')->getVariants() as $id => $name) {
                            $isChecked = in_array($id, $filterFabric->getFilter('brandFilter')->getValue()) ? 'checked' : '';
                            ?>
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" data-type="filter"
                                           name="<?= $filterFabric->getFilter('Brand')->getFieldName() ?>[]"
                                           value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param" data-filter="brands">
                                           <?= $name ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                        <hr />
                        <legend>Price</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Price')->getVariants() as $id => $name) {
                            $isChecked = $filterFabric->getFilter('priceFilter')->getValue() == $id ? 'checked' : '';
                            $elemId = 'price-' . $id;
                            ?>
                            <div class="radio">
                                <label for="<?= $elemId ?>">
                                    <input type="radio" name="<?= $filterFabric->getFilter('Price')->getFieldName() ?>" id="<?= $elemId ?>" value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param"  data-filter="price" />
                                    <?= $filterFabric->getFilter('Price')->getLabel($id) ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                        <hr />
                        <legend>Quality</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Quality')->getVariants() as $id => $name) {
                            $isChecked = $filterFabric->getFilter('qualityFilter')->getValue() == $id ? 'checked' : '';
                            $elemId = 'quality-' . $id;
                            ?>
                            <div class="radio">
                                <label for="<?= $elemId ?>">
                                    <input type="radio" name="<?= $filterFabric->getFilter('Quality')->getFieldName() ?>" id="<?= $elemId ?>" value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param"  data-filter="quality" />
                                    <?= $name ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                    </form>
                </div>
            </div>
        </div>
        <!-- END CONTENT ITEM -->
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="hidden-xs col-sm-12">
                <div class="slider-wrapper theme-light">
                    <div class="ribbon"></div>
                    <div id="slider2" class="nivoslider">
                        <img src="/images/banner_01-v3.jpg" alt=""
                             title="This is an example of an optional long caption text"/>
                        <img src="/images/banner_02-v3.jpg" alt="" title=""/>
                        <img src="/images/banner_03-v3.jpg" alt="" title=""/>
                        <img src="/images/banner_04-v3.jpg" alt="" title="Another caption"/>
                    </div>
                </div>
                <br>
            </div>
        </div>
    </div>
    <!-- END CONTENT ITEM -->
    <div class="col-xs-12 col-sm-9">
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="col-xs-12 col-sm-9">
                <h2><?= $pageTitle ?></h2>
            </div>
        </div>
        <!-- END CONTENT ITEM -->
        <?php
        if (count($products) > 0) {
            $rows = count($products) % 4 == 0 ? count($products) / 4 : ceil(count($products) / 4);
            for ($r = 0; $r < $rows; $r++) {<commit_msg>Escape Search string in template<commit_after><script>
    $(function() {
        var queryParameters = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m;
        while (m = re.exec(queryString)) {
            queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
        }
        $("#filter-block input[data-filter=brands]").on("change", function(e) {
            queryParameters['brands'] = $(this).val();
            location.search = $.param(queryParameters);
        });

        $("#filter-block input[data-filter=price]").on("change", function(e) {
            queryParameters['price'] = $(this).val();
            location.search = $.param(queryParameters);
        });

        $("#filter-block input[data-filter=quality]").on("change", function(e) {
            queryParameters['quality'] = $(this).val();
            location.search = $.param(queryParameters);
        });
    });
</script>
<div class="row">
    <div class="col-xs-12 col-sm-3">
        <br/>
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="col-xs-12">
                <div class="well well-small" id="filter-block">
                    <form action="/search">
                        <legend>Brands</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Brand')->getVariants() as $id => $name) {
                            $isChecked = in_array($id, $filterFabric->getFilter('brandFilter')->getValue()) ? 'checked' : '';
                            ?>
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" data-type="filter"
                                           name="<?= $filterFabric->getFilter('Brand')->getFieldName() ?>[]"
                                           value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param" data-filter="brands">
                                           <?= $name ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                        <hr />
                        <legend>Price</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Price')->getVariants() as $id => $name) {
                            $isChecked = $filterFabric->getFilter('priceFilter')->getValue() == $id ? 'checked' : '';
                            $elemId = 'price-' . $id;
                            ?>
                            <div class="radio">
                                <label for="<?= $elemId ?>">
                                    <input type="radio" name="<?= $filterFabric->getFilter('Price')->getFieldName() ?>" id="<?= $elemId ?>" value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param"  data-filter="price" />
                                    <?= $filterFabric->getFilter('Price')->getLabel($id) ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                        <hr />
                        <legend>Quality</legend>
                        <?php
                        foreach ($filterFabric->getFilter('Quality')->getVariants() as $id => $name) {
                            $isChecked = $filterFabric->getFilter('qualityFilter')->getValue() == $id ? 'checked' : '';
                            $elemId = 'quality-' . $id;
                            ?>
                            <div class="radio">
                                <label for="<?= $elemId ?>">
                                    <input type="radio" name="<?= $filterFabric->getFilter('Quality')->getFieldName() ?>" id="<?= $elemId ?>" value="<?= $id ?>" <?= $isChecked ?> data-type="filter-param"  data-filter="quality" />
                                    <?= $name ?>
                                </label>
                            </div>
                            <?php
                        }
                        ?>
                    </form>
                </div>
            </div>
        </div>
        <!-- END CONTENT ITEM -->
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="hidden-xs col-sm-12">
                <div class="slider-wrapper theme-light">
                    <div class="ribbon"></div>
                    <div id="slider2" class="nivoslider">
                        <img src="/images/banner_01-v3.jpg" alt=""
                             title="This is an example of an optional long caption text"/>
                        <img src="/images/banner_02-v3.jpg" alt="" title=""/>
                        <img src="/images/banner_03-v3.jpg" alt="" title=""/>
                        <img src="/images/banner_04-v3.jpg" alt="" title="Another caption"/>
                    </div>
                </div>
                <br>
            </div>
        </div>
    </div>
    <!-- END CONTENT ITEM -->
    <div class="col-xs-12 col-sm-9">
        <!-- START CONTENT ITEM -->
        <div class="row">
            <div class="col-xs-12 col-sm-9">
                <h2><?= $_($pageTitle, 'searchString'); ?></h2>
            </div>
        </div>
        <!-- END CONTENT ITEM -->
        <?php
        if (count($products) > 0) {
            $rows = count($products) % 4 == 0 ? count($products) / 4 : ceil(count($products) / 4);
            for ($r = 0; $r < $rows; $r++) {
{'fraction_non_alphanumeric': 0.16892135642135642, 'fraction_numerical': 0.006673881673881674, 'mean_word_length': 1.127590176515733, 'pattern_counts': {'":': 0, '<': 183, '<?xml version=': 0, '>': 227, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391707', 'n_tokens_mistral': 2912, 'n_tokens_neox': 2741, 'n_words': 501}