2

I am developping a MVC project and facing a weird problem.

In my view;

If I define a div like this

  <div class="col-lg-1" style="padding-top: 10px">05931-1</div>

enter image description here

Hyphen is displayed in a new line. (second textbox)

When I Copy-paste this text into the text box and submit the form, everything is fine. I make a web service call and I get the proper results.

enter image description here

When I define the div like this, hyphen is not shown in new line.

<div class="col-lg-1" style="padding-top: 10px">05931&#8209;1</div> 

enter image description here

When I copy paste this result and debug the code I can also see the same values for the input however, web service returns empty results as if there is a problem.

enter image description here

Any idea about this behavior?

Zbidi
  • 116
  • 10
  • That's just standard wrapping behaviour because the content is bigger than the area. You can force it to not wrap by making the container bigger or using CSS [like this question](http://stackoverflow.com/questions/718891/how-to-make-a-div-not-wrap) – musefan Mar 31 '17 at 08:18
  • but when I debug, input.CimIstasyon is same in both cases – Zbidi Mar 31 '17 at 08:19
  • a hypen like in your text equates to - not #8209; they arent comparible texts .. 8209 specifically is NON line breaking.. – BugFinder Mar 31 '17 at 08:19
  • @Zbidi: Just cause they look the same, does not mean they are the same character – musefan Mar 31 '17 at 08:20
  • 05931-1 this also does not show in the same line – Zbidi Mar 31 '17 at 08:21
  • @musefan do you mean the debugger shows the same results, but actually are they not the same results? – Zbidi Mar 31 '17 at 08:22
  • @Zbidi so you're getting the results as expected... – BugFinder Mar 31 '17 at 08:22
  • Thanks guys, I got the point. Thank you very much for the answers. – Zbidi Mar 31 '17 at 08:27

1 Answers1

1

In short

a hypen like in your text equates to - not #8209; they arent comparible texts .. 8209 specifically is NON line breaking, eg, do not wrap the line here

You are getting expected results.

BugFinder
  • 17,474
  • 4
  • 36
  • 51