title: Python print html output together with bootstrap modals
body: <p>I want to do something very specific.</p>
  
  <p>I have an Raspberry Pi2 with Apache2. I control with the raspberry Pi different ultrasonic sensors. The signals from the ultrasonic sensors are processed in a python program.</p>
  
  <p>Depending on the values that I get back from the sensors, I write information in different strings. These strings are used to create my HTML file. </p>
  
  <p>Afterwards, I send the HTML file with the print() command to Apache where my information gets displayed via the browser. </p>
  
  <p>Now starts the confusing part. In these strings I use bootstrap modals. For example: </p>
  
  <pre><code>&lt;button type="button"
          class="btn btn-success btn-sm"
          style="width: 100%; height:100%; font-size:36px;"
          data-toggle="modal" data-target="#modal1"&gt;TEST&lt;/button&gt;
  &lt;div class="modal fade"
       id="modal1"
       tabindex="-1"
       role="dialog"
       aria-labelledby="modal1"
       aria-hidden="true"
       style="display: none;"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;h4 class="modal-title"&gt;Check!&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          &lt;p&gt;TEST!&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have already tested if these modals work on the Raspberry, and they do but only when I have pure HTML code. When I want to send exactly the same information to the server with a command, for example:</p>
  
  <pre><code>print ('%s'% test)
  </code></pre>
  
  <p>And the the test (test ="""....modal...""") strings contains exactly the same information, it doesn't work.</p>
  
  <p>Does anyone know what could be the problem?</p>