Strange output of Text object when using some Czech national characters

Issues related to previewing and publishing your web site.
Post Reply
oksoftware
 
 
Posts: 3
Joined: Fri Nov 06, 2020 11:02 am

Strange output of Text object when using some Czech national characters

Post by oksoftware »

I found almost impossible to use the Text object with the output format set to "Use <p> tags" together with national characters like í, ý, š, č etc.
The problem is that it breaks lines into several parts. This happens mainly when using header styles, but sometimes it also causes an insertion of enormous number of span tags in paragraphs.
Then the header tags are impossible to be used, because when they are displayed as blocks, single lines will be divided to several lines. When I keep the default inline display option, several headers will connect together.
An example: three H1 header lines, all containing simple text "Text obsahující český text ěščřžýáíéúůňť" pasted from the clipboard will result into:

Code: Select all

<h1>Text obsahující </h1><h1>česk</h1><h1>ý text </h1><h1>ěščřž</h1><h1>ýáíéú</h1><h1>ůňť</h1>
<h1>Text obsahuj</h1><h1>ící český text ěščřžýáíéúůňť</h1>
<h1>Text obsahující český text ěščřžýáíéúůňť</h1>
The result is unpredictable, because next time the sentence can be broken wherever else or not at all.
Please, download a sample project from https://rke.cz/Sample.wbs
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Strange output of Text object when using some Czech national characters

Post by Pablo »

The option "Use <p> tag" can only be used in combination with 'Responsive fonts'.
This means that the style of the entire textbox must be the same. it cannot contain other styles, like headings.

This is documented in the help and here:
https://www.wysiwygwebbuilder.com/forum ... 10&t=34318
oksoftware
 
 
Posts: 3
Joined: Fri Nov 06, 2020 11:02 am

Re: Strange output of Text object when using some Czech national characters

Post by oksoftware »

Thank you for the explanation. I thought that I can mix different styles in the Text object. Now it is clear that I just created an unhandled case. For me it was very strange that it affected national specific characters only. Several times I also met an issue when the text object lost all those characters, so for example "Řešení" changed to "?e?en?". I can't reproduce the error easily, but it was related to a situation when I used the heading styling to some text and then I removed formatting. And one last thing, when I wanted to use inline SVG in style sheet using HTML object (CSS in media query), it broke all styling. When I insert into HTML object something like this:

Code: Select all

.sample {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><linearGradient id='gradient'><stop offset='10%' stop-color='%23F00'/><stop offset='90%' stop-color='%23fcc'/> </linearGradient><rect fill='url(%23gradient)' x='0' y='0' width='100%' height='100%'/></svg>") !important;
}
The code above will cause a corruption of generated CSS and will skip the remaining content of the HTML object.

When I use apostrophes instead of quotes, i.e.:

Code: Select all

.sample {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'10\' height=\'10\'><linearGradient id=\'gradient\'><stop offset=\'10%\' stop-color=\'%23F00\'/><stop offset=\'90%\' stop-color=\'%23fcc\'/> </linearGradient><rect fill=\'url(%23gradient)\' x=\'0\' y=\'0\' width=\'100%\' height=\'100%\'/></svg>') !important;
}
The code above will break the CSS code after semicolon character, so the result is also invalid, although the browser is able to process other CSS commands.

The only way how to get a proper result is to use custom styling in the object and to avoid using quotes.
Please, see the updated sample project https://rke.cz/Sample.wbs
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Strange output of Text object when using some Czech national characters

Post by Pablo »

I thought that I can mix different styles in the Text object.
You can use different styles in a text object, only not when you use <p> output. This mode was designed for responsive text.
when I wanted to use inline SVG in style sheet using HTML object (CSS in media query), it broke all styling.
This is related to the output formatting in Tools -> Options -> HTML.
If you select 'default' then it will work correct.
oksoftware
 
 
Posts: 3
Joined: Fri Nov 06, 2020 11:02 am

Re: Strange output of Text object when using some Czech national characters

Post by oksoftware »

Thank you very much for your fast response. Amazing support, I am glad I found and bought your software.
Post Reply