The nbsp plague

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

The nbsp plague

Felix Natter
Administrator
hello freeplane devs,

simplyhtml often generates non-breaking spaces ( )
which is really annoying e.g. if you want to paste SQL:
  create table bla( field....)
--> mysql will name the field " field" which is a hard to find
    problem...

I see a few options:

- a button format->clean spaces which converts nbsps in a region to
  spaces --> not very convenient, we need something automatic.

- a prefs option to automatically convert all nbsps to spaces when
  they're created or when simplyhtml saves (closes with "Ok").

- like above, but be able to designate nodes as plain-text
  core. Format=Plain-text? Is there a similar thing already?

Do you have other ideas?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Dimitry Polivaev
Administrator
> simplyhtml often generates non-breaking spaces ( )

because multiple spaces are displayed like a single space AFAIK
> - like above, but be able to designate nodes as plain-text
>    core. Format=Plain-text? Is there a similar thing already?


Freeplane should generally save all node core content without formatting as plain text

Regards,
Dimitry

Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Felix Natter
Administrator
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

hello Dimitry,
hello Devs,

>> simplyhtml often generates non-breaking spaces (&nbsp;)
>
> because multiple spaces are displayed like a single space AFAIK
>> - like above, but be able to designate nodes as plain-text
>> core. Format=Plain-text? Is there a similar thing already?
>
> Freeplane should generally save all node core content without formatting as
a> plain text

I also seem to remember this behavior. Seems to be broken. I tested with
1.3.12:

- create a new node
- edit
- enter "xxx    yyy"
- Ok
- --> xxx&nbsp;&nbsp;&nbsp;&nbsp;yyy
(which is bad enough - if I copy the content without re-opening
freeplane)

the .mm looks good:
<node TEXT="xxx    yyy" POSITION="right" ID="ID_1941011287">

But when I re-open freeplane:
xxx&#160;&#160;&#160;&#160;yyy

Looks like we need to fix two things:
- When copying from simplyhtml, and no formatting is detected, then
  nbsp's should be converted.
- When loading a node with nbsp's and no formatting is detected, then
  spaces should not be converted to nbsp's.

I will do this if I get some input.

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Dimitry Polivaev
Administrator
> the .mm looks good:
> <node TEXT="xxx    yyy" POSITION="right" ID="ID_1941011287">
>
> But when I re-open freeplane:
> xxx&#160;&#160;&#160;&#160;yyy

Do you have &#160; in plain text or in html clipboard content?


Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Dimitry Polivaev
Administrator
In reply to this post by Felix Natter
> - When copying from simplyhtml, and no formatting is detected, then
>    nbsp's should be converted.
> - When loading a node with nbsp's and no formatting is detected, then
>    spaces should not be converted to nbsp's.

In html representation nbsp's are IMHO unavoidable and in text content they are wrong.
If you copy from any html editor (inline or simply html based) it should behave in this sense

Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Felix Natter
Administrator
In reply to this post by Dimitry Polivaev
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

>> the .mm looks good:
>> <node TEXT="xxx yyy" POSITION="right" ID="ID_1941011287">
>>
>> But when I re-open freeplane:
>> xxx&#160;&#160;&#160;&#160;yyy
>
> Do you have &#160; in plain text or in html clipboard content?

in plain text view simplyhtml (I see that because it pops up in the
paste target, e.g. SQL console), in HTML view (simplyhtml)
and of course (see above) in paste target / clipboard content.

Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Felix Natter
Administrator
In reply to this post by Dimitry Polivaev
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

>> - When copying from simplyhtml, and no formatting is detected, then
>> nbsp's should be converted.
>> - When loading a node with nbsp's and no formatting is detected, then
>> spaces should not be converted to nbsp's.

hello Dimitry,
hello Devs,

> Do you have &#160; in plain text or in html clipboard content?

it's in:
- simplyhtml html view (obviously)
- clipboard content (because it ends up in the paste target, e.g. SQL
  console)
- simplyhtml plain text view (because it ends up in clipboard)

> In html representation nbsp's are IMHO unavoidable and in text content they
> are wrong.

This is acceptable. If you save a script invocation or SQL statements,
then this must be plain-text content.

> If you copy from any html editor (inline or simply html based) it should
> behave in this sense

The nbsps are removed in *.mm, but there are present at runtime,
so you get into trouble when pasting from freeplane.

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

h.goebel
Administrator
In reply to this post by Felix Natter
Am 15.11.2015 um 08:26 schrieb Felix Natter [via Freeplane Developer]:
> the .mm looks good:
> <node TEXT="xxx    yyy" POSITION="right" ID="ID_1941011287">

Did sou check this with an hex-viewer? Maywe these are nbsp, too, which
display like normale spaces.

--
Regards
Hartmut Goebel

| Hartmut Goebel          | [hidden email]               |
| www.crazy-compilers.com | compilers which you thought are impossible |

--
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Felix Natter
Administrator
"h.goebel [via Freeplane Developer]"
<[hidden email]> writes:

hello Hartmut,

> Am 15.11.2015 um 08:26 schrieb Felix Natter [via Freeplane Developer]:
>> the .mm looks good:
>> <node TEXT="xxx yyy" POSITION="right" ID="ID_1941011287">
>
> Did sou check this with an hex-viewer? Maywe these are nbsp, too, which
> display like normale spaces.

Good point, but no, these are normal spaces.

Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: The nbsp plague

Dimitry Polivaev
Administrator
In reply to this post by Felix Natter
I fixed it

Regards, Dimitry