Skip to Content

missing a single space in html output

Hello to all,

take a look at the following code copied from a View

<% DATA: eins TYPE STRING VALUE 'ClassEins',
         zwei TYPE STRING VALUE 'ClassZwei'. %>
<span id="Test1" class="<%=eins%> ClassZwei">test it</span>
<span id="Test2" class="ClassEins <%=zwei%>">test it</span>

it works fine if compression is set to NONE, but if compression is set to 1 (remove spaces) or 2 (remove spaces, CR, LF) the html output looks like this:

<span id="Test1" class="ClassEinsClassZwei">test it</span>
<span id="Test2" class="ClassEins ClassZwei">test it</span>

Where is the single space? What’s wrong? Why is the first space removed, but the second isn’t?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 31, 2005 at 10:18 PM

    hallo Thilo,

    I searched high and low tonight. You are right. The one space character went AWOL. Really not acceptable. You have my permission to open an OSS trouble ticket and complain bitterly. Or if it is to much work, just trust that we will sent out a search party and bring it back within the next many service packs.

    brian

    Add a comment
    10|10000 characters needed characters exceeded

    • Thilo,

      At this stage we are not planning a kernel patch, unless your business case is really pressing. (In which case update OSS message so that rethink why nein is the right answer.) We have actually spend a number of hours to find where this is stripped (by accident), and see that the price to fix this, is very high for us. The truth is that this is a minor problem that only happens when you active the additional compression, where our first suggestion would be to just skip the compression for this page. (All of this been said, we will keep it on the toDo list, and see if can get the resources at same stage to dive into kernel development again.)

      (Just for interest, not even myself could remember where some of this code is executed. Your problem provided a nice trip down memory lane!)

      As for the back tics, they are string literals, and are space sensitive in ABAP. An example:

        CONCATENATE 'a ' 'b ' 'c ' INTO s. --> s = "abc".
        CONCATENATE `a ` `b ` `c ` INTO s. --> s = "a b c ".
      

      The nice thing about this is that it is now possible to write in ABAP strings that contain <b>both</b> HTML and JavaScript all in one:

        s = `<body onload="myFunc('JSparm');">`.
      

      We use " and ' for the HTML and JavaScript, and the ` to build the ABAP string. Makes the Java colleagues just jealous of our writing style:)

      brian

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.