Skip to content

Commit

Permalink
Issue #6327: Handle trimmed content consistently across libxml versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela committed Apr 20, 2024
1 parent 266a501 commit 6e3f25a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/misc/setup-php-fpm.sh
Expand Up @@ -17,12 +17,15 @@ sudo sed -i -e 's/user = www-data/user = runner/' \
-e 's/pm.start_servers = 2/pm.start_servers = 4/' \
-e 's/pm.min_spare_servers = 1/pm.min_spare_servers = 2/' \
-e 's/pm.max_spare_servers = 3/pm.max_spare_servers = 4/' \
ls /etc/php/*/fpm/pool.d/www.conf
/etc/php/*/fpm/pool.d/www.conf

# Let above changes take effect and setup Apache to work with php-fpm.
sudo systemctl restart php${1}-fpm.service
sudo apt-get -q install libapache2-mod-fcgid
sudo a2enmod rewrite proxy fcgid proxy_fcgi
sudo systemctl start apache2.service
sudo systemctl restart apache2.service
# This prevents the "denied (filesystem path '/home/runner/work') because search
# permissions are missing on a component of the path" problem.
sudo chmod 751 /home/runner

exit 0
2 changes: 1 addition & 1 deletion .github/workflows/functional-tests.yml
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
simpletest:
name: Simpletest batches
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
# Skip this job if the PR title contains "[skip tests]".
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
timeout-minutes: 20
Expand Down
3 changes: 3 additions & 0 deletions core/modules/field/modules/text/text.module
Expand Up @@ -494,6 +494,9 @@ function text_summary($text, $format_id = NULL, $size = 600) {
}
}

// Trim opening tag fragment like previous versions of libxml did.
$summary = rtrim($summary, '<');

// Clean up any invalid HTML.
if (function_exists('_filter_htmlcorrector')) {
$summary = _filter_htmlcorrector($summary);
Expand Down

0 comments on commit 6e3f25a

Please sign in to comment.