Skip to content

Commit

Permalink
Escape paging_nav
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikax committed May 3, 2020
1 parent 450d63b commit 52447fb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
30 changes: 28 additions & 2 deletions library/frontend/main-structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,6 @@ function greenlet_paging_nav( $query = null ) {
}

$current_page = max( 1, $paged );
// Not sure. Maybe get $paged from $_POST['current'].

if ( 'number' === $format || 'ajax' === $format ) {

Expand Down Expand Up @@ -699,7 +698,34 @@ function greenlet_paging_nav( $query = null ) {
$op .= '<input type="hidden" id="greenlet_generic_nonce" value="' . wp_create_nonce( 'greenlet_generic' ) . '" />';
$op .= "</ul>\n";

echo apply_filters( 'greenlet_paging_nav', $op, $pages, $pag_attr ); // phpcs:ignore
$pagination_tags = array(
'ul' => array(
'class' => true,
'id' => true,
),
'li' => array(
'class' => true,
'id' => true,
),
'a' => array(
'class' => true,
'id' => true,
'href' => true,
'data-next' => true,
),
'span' => array(
'class' => true,
'id' => true,
),
'input' => array(
'class' => true,
'id' => true,
'type' => true,
'value' => true,
),
);

echo wp_kses( apply_filters( 'greenlet_paging_nav', $op, $pages, $pag_attr ), $pagination_tags );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ elif [ "$1" == "--final" ]; then
buildfonts
removePOBackups
printf "${BGREEN}STEP 3: BUNDLING${NC}\n"
rsync -avP --exclude '*.git*' --exclude '*node_modules*' --exclude '*package*' --exclude '*tests*' --exclude '*.DS_Store*' --exclude '*src/build*' --exclude '*src/.env' \
--exclude 'library/pro*' --exclude 'pro*' --exclude 'todo.txt' --exclude '*.map' ./* --delete ~/Desktop/greenlet
rsync -avP --exclude '*.git*' --exclude '*node_modules*' --exclude '*package*' --exclude '*tests*' --exclude '*.DS_Store*' --exclude '*src/build*' --exclude '*src/update-version' \
--exclude '*src/.env' --exclude 'library/pro*' --exclude 'pro*' --exclude 'todo.txt' --exclude '*.map' ./* --delete ~/Desktop/greenlet
current=$(pwd)
cd ~/Desktop
zip -r greenlet.zip greenlet
Expand Down

0 comments on commit 52447fb

Please sign in to comment.