Is there a way to prevent hyphenated words from breaking up across lines in my survey? | XM Community
Solved

Is there a way to prevent hyphenated words from breaking up across lines in my survey?


In my survey, I have questions that are very similar, except that some of them refer to cigarettes (i.e., combustible tobacco) and some refer to e-cigarettes (i.e., electronic cigarettes). In the questions that pertain to e-cigarettes, the product is identified as such, with e[hyphen]cigarette.

Because it's important that my respondents be able to differentiate between the two products, I would like to prevent the hyphenated word, "e-cigarette," from breaking up across lines, as one can do with non-breaking hyphens in Word. Is this possible? In my initial contact with phone support, the tech said no, but he seemed fairly uncertain.

Ideas? Thanks in advance!
icon

Best answer by WaterSampler 2 May 2019, 01:02

View original

8 replies

Badge +1
If the non-breaking hyphen Unicode character (html code ‑) does not work, can you reword your text? Not ideal but it might work.
Hmmm. What is the HTML code for that? And how do I set that up, through the rich text edit option?

Unfortunately, even rewording, such by spelling out "electronic cigarette" rather than using the term "e-cigarette," would present the same problem, such that the phrase would likely be broken up as well. But ultimately, rewording is not really an option, as some of the items on the survey come from instruments that have been validated only using exact wording.
Badge +1
I had put in the html code for the non-breaking hyphen, but the code was interpreted instead...

This link has the html code:
https://unicode-table.com/en/2011/
Badge +1
You are correct in your approach if your instrument has been validated.
Badge +1
To use the code, go to html view for the question text. Replace the existing hyphen with the code. Then click normal view to see that the code was processed. Then you can test it out.

Sorry about multiple responses. Had someone come in with an issue.
Great! I will have to give that a try. Thanks for the input!

> @WaterSampler said:
> I had put in the html code for the non-breaking hyphen, but the code was interpreted instead...
>
> This link has the html code:
> https://unicode-table.com/en/2011/
By George, I think you've solved it! Thanks, @WaterSampler!
Badge +1
You're welcome @crispyteriyaki.

Make certain to test this with a couple of browsers (native browser, firefox, etc.) on each platform (android, apple, windows, etc.) to insure that it works across all. There were issues with the old html nbr sequence before it was removed. If it does not work, you might have to use e cigarette. That should not change the validation.

Leave a Reply