By webdrips on
Hi all.
I am experiencing a strange problem: unwanted line breaks are being inserted into my nodes when none are present, regardless of the entry method (rich text or standard using the TinyMCE module). If it matters, I am using Drupal 5.2.
The best way I can explain this is with an example. The following entry:
Choose the appropriate item from the list: <dl><dt><a href="/user/me/track" title="My posts">My posts</a></dt><dd>Some description</dd><dt>...</dt><dd>...</dd></dl>
Becomes this:
<div class="content">
<p>Choose the appropriate item from the list:<br /><br /><dl><br /><dt><a href="/user/me/track" title="My posts">My posts</a></dt><br /><dd>Some description</dd><br /><dt>...</dt><br /><dd>...</dd><br /></dl><br /> </div>
Note: there are NO line breaks in the text entry screen. (I double-checked this in a text editor by turning line wrap off).
Any ideas?
Thanks in advanced.
Dan
Comments
turn it off
If you want to take full control of your code without it trying to be 'nice' to you like that, just turn off the line break filter (on by default) for that input format.
Note that this means that all pages made with that filter will no longer get their automatic line breaks, but if you are using a WYSIWYG anyway, that shouldn't be a problem.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Thanks Dan
That seemed to work, but isnt't this some sort of bug with the code.
I mean if I personally had inserted line breaks anywhere, I would expect it to show up in the code.
But if I insert one long string, I do not expect this behavior.
They seem to have some sort of rule set up that says insert a line break if you encounter any sort of list.
Maybe I should submit this as a bug?
Looking to Migrate from Drupal 6/7 to Drupal 10/11? Have a look at our Drupal 11 demo site and request access.
What filter are you using with tinymce?
This might not be related, but I've found that when I install TinyMCE, I make a new filter that doesn't do anything. I usually label it No Filter and make that the default filter. Sometimes using TinyMCE and having a filter will cause your output to behave in strange ways.
Hopefully that might help!
Filter for TinyMCE?
Hi Greg.
I didn't exactly follow your post. Can you be more specific?
Thanks,
Dan
Looking to Migrate from Drupal 6/7 to Drupal 10/11? Have a look at our Drupal 11 demo site and request access.
as in the README...
Agreed, the install instructions for all the WYSIWYG tools do (or at least should) explain that they operate best on non-filtered input formats, and that's a step you should find in the README. Yep, it's documented there
As for why it happened as described (and you are positive that there was really no whitespace in the lines that got broken) it's a matter of finding where in the insanely 'clever' paragraph-breaking algorithm that got triggered. Not me.
I've not seen it happen when using plain-code input + default line breaks, so I suspect it's either a side-effect or misconfiguration of TinyMCE
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Never mind...figured out what your are talking about...
Hi Greg.
Never mind...I figured out what you were talking about and that seemed to work.
Thanks again all.
Dan
Looking to Migrate from Drupal 6/7 to Drupal 10/11? Have a look at our Drupal 11 demo site and request access.
Glad that fixed it!
Glad that fixed it!