Can't remove unwanted line break on 2nd language

More
4 years 10 months ago #85368 by jay_ar
jay_ar created the topic: Can't remove unwanted line break on 2nd language
I'm working on a bilingual (English and Spanish) survey, and I'm getting a weird unwanted behavior out of LS. Hopefully someone around here knows what's going on, and how to fix it.

I'm using LS v. 1.92+ build 120909, both on my PC (running XP) and on an online server (Linux shared server on 1and1.com). On both of them happens the same thing: I added some javascript code to the group description, to display the language selector only if the user wants it. The [source] on the English version shows only the script (as it should). However, when I check the source of the Spanish version, there's always a page break ( <br />) BEFORE the code. I have tried deleting the <br /> time and time again, but to no avail. After I save the question and open it again, the line break comes back.

Any idea why is this happening?
Thanks!
Attachments:

Please Log in to join the conversation.

More
4 years 10 months ago #85369 by jay_ar
jay_ar replied the topic: Can't remove unwanted line break on 2nd language
(Tried editing the post but apparently it didn't work)

I just confirmed the same behavior is present using different languages and templates. To reproduce it:
- Create a new survey in more than one language
- Add a question group to it
- Edit the "description" source code in each language, adding some javascript to it. (i.e. <script charset="utf-8" type="text/javascript">
alert("Test!")
}</script> )
- Save your changes
- Edit the question group' description, and compare the source between the differen languages

Please Log in to join the conversation.

More
4 years 10 months ago #85504 by tpartner
tpartner replied the topic: Can't remove unwanted line break on 2nd language
Try replacing the <br /> tag with an empty HTML element like:
<div></div>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
4 years 10 months ago #85533 by jay_ar
jay_ar replied the topic: Can't remove unwanted line break on 2nd language
Thank you for replying!

Well... the empty <div> does something, but still there's a gremlin somewhere :)

(sorry for the bold font... using it to highlight comments)

For the question in Spanish, I first entered:

<script type="text/javascript" charset="utf-8">
alert ("Hello world");
</script>

When I re-opened the source code, I got:
<br />
<script type="text/javascript" charset="utf-8">
alert ("Hello world");
</script>


So... now I entered the empty <div>:
<div></div>
<script type="text/javascript" charset="utf-8">
alert ("Hello world");
</script>

...and upon re-opening the source code, I get:
<div>
 </div>
<script type="text/javascript" charset="utf-8">
alert ("Hello world");
</script>

I guess I can modify the 1st language so it looks like the 2nd one after the gremlin-induced </br>, but the question is: why do this thing appear *only* on the 2nd language?

Please Log in to join the conversation.

More
4 years 10 months ago #85548 by DenisChenu
DenisChenu replied the topic: Can't remove unwanted line break on 2nd language
Deactivate HTML inline editor and use HTML popup editor.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 10 months ago #85578 by jay_ar
jay_ar replied the topic: Can't remove unwanted line break on 2nd language
Well... that did the trick. Thanks!

Now... when the inline editor adds some extra code for the 2nd language, is it a bug or is it the intended behavior? Or using other wording: is this something that should be reported?

Please Log in to join the conversation.

More
4 years 10 months ago #85590 by DenisChenu
DenisChenu replied the topic: Can't remove unwanted line break on 2nd language
Not sure, very specific usage (empty question text: only javascript).

It's more a ckeditor bug. Maybe there are some opton ti put. You can put a bug report, but it's a minor bug i think.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now