Skip to content
Snippets Groups Projects
Unverified Commit 967e1677 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3212498 by vsujeetkumar, guilhermevp, Lms300, paulocs, ravi.shankar,...

Issue #3212498 by vsujeetkumar, guilhermevp, Lms300, paulocs, ravi.shankar, pragati_kanade, mitthukumawat, Spokje, longwave: Incorrect break (</br>) tag
parent 749dd1d0
Branches
Tags
13 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!43Resolve #3173180: Add UI for 'loading' html attribute to images,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
......@@ -124,7 +124,7 @@ public function onException(ExceptionEvent $event) {
$content_type = $event->getRequest()->getRequestFormat() == 'html' ? 'text/html' : 'text/plain';
$content = $this->t('The website encountered an unexpected error. Please try again later.');
$content .= $message ? '</br></br>' . $message : '';
$content .= $message ? '<br><br>' . $message : '';
$response = new Response($content, 500, ['Content-Type' => $content_type]);
if ($exception instanceof HttpExceptionInterface) {
......
......@@ -104,7 +104,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
$form['entity_types_container']['entity_types'][$entity_type->id()] = [
'type' => [
'#type' => 'inline_template',
'#template' => '<strong>{{ label }}</strong></br><span id="selected-{{ entity_type_id }}">{{ selected_bundles }}</span>',
'#template' => '<strong>{{ label }}</strong><br><span id="selected-{{ entity_type_id }}">{{ selected_bundles }}</span>',
'#context' => [
'label' => $this->t('@bundle types', ['@bundle' => $entity_type->getLabel()]),
'entity_type_id' => $entity_type->id(),
......
......@@ -199,7 +199,7 @@ public function testExceptionEscaping() {
// final exception subscriber, it is printed as partial HTML, and hence
// escaped.
$this->assertEquals('text/plain; charset=UTF-8', $response->headers->get('Content-type'));
$this->assertStringStartsWith('The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException</em>: Not acceptable format: json&lt;script&gt;alert(123);&lt;/script&gt; in <em class="placeholder">', $response->getContent());
$this->assertStringStartsWith('The website encountered an unexpected error. Please try again later.<br><br><em class="placeholder">Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException</em>: Not acceptable format: json&lt;script&gt;alert(123);&lt;/script&gt; in <em class="placeholder">', $response->getContent());
}
}
......@@ -35,7 +35,7 @@ public function testOnExceptionWithUnknownFormat() {
$response = $event->getResponse();
$this->assertInstanceOf(Response::class, $response);
$this->stringStartsWith('The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
$this->stringStartsWith('The website encountered an unexpected error. Please try again later.<br><br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
$this->assertEquals(405, $response->getStatusCode());
$this->assertEquals('POST, PUT', $response->headers->get('Allow'));
// Also check that the text/plain content type was added.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment