-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contents of <pre> should not be parsed #25
Comments
Moving from: case 'PLAINTEXT':
$entity->translated_body = '<pre class="plaintext">'
. nl2br(htmlentities(
$entity->translated_body, ENT_XML1 | ENT_NOQUOTES | ENT_SUBSTITUTE), true)
. '</pre>';
break; To: case 'PLAINTEXT':
$entity->translated_body = htmlentities(
$entity->translated_body, ENT_XML1 | ENT_NOQUOTES | ENT_SUBSTITUTE);
$entity->translated_body = str_replace(' ', ' ', $entity->translated_body);
$entity->translated_body = str_replace("\t", '	', $entity->translated_body);
$entity->translated_body = nl2br($entity->translated_body, true);
$entity->translated_body = '<pre class="plaintext">' . $entity->translated_body . '</pre>';
break; Resolved most of the issue but there is still the left padding injected by |
linawolf
added a commit
to linawolf/rst-parser
that referenced
this issue
Jan 19, 2023
The project has many bugs that influence testing, Especially gajus/dindent#25 is causing problems. The project does not seem well maintained. Switch to manual whitespace removal + DOM comparing in functional test. Deprecate option to indent files. This was never really possible as gajus was only required in dev, option was offered for production however. Projects wishing to indent files nicer can do so in post-processing HTML, using the Events
linawolf
added a commit
to linawolf/rst-parser
that referenced
this issue
Jan 19, 2023
The project has many bugs that influence testing, Especially gajus/dindent#25 is causing problems. The project does not seem well maintained. Switch to manual whitespace removal + DOM comparing in functional test. Deprecate option to indent files. This was never really possible as gajus was only required in dev, option was offered for production however. Projects wishing to indent files nicer can do so in post-processing HTML, using the Events
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am building some Twig based Content Application Framework and when debugging
<pre>
's newlines and whitespaces should be left untouched to support plain-text content type.The text was updated successfully, but these errors were encountered: