pugjs / pug-www

The website for Pug.
16 stars 12 forks source link

Render error for Chrome but Postman correct #77

Closed gb53smith closed 4 years ago

gb53smith commented 4 years ago

In this code I continue a table with the results of a database search

extends wineSearch

block content
   for val in wineSelection
      tr
         td
            form(action='/wine/update', method='POST')
               input(type='hidden', name='loc', value=val.wine_Location)
               button.loc_button=val.wine_Location   
         td= val.wine_Quantity
         td= val.wine_Type
         td= val.wine_Colour
         td= val.wine_Grape
         td= val.wine_Winery
         td= val.wine_Country
         td= val.wine_Vintage

In chrome the first row, the form is excluded. Remaining rows are correct. Testing using Postman yields the correct result

Chrome: (error)

                        <td>
                            <input type="hidden" name="loc" value="E1" /><button
                                class="loc_button"
                            >
                                E1
                            </button>
                        </td>

Postman: (correct)

<td>
                        <form action="/wine/update" method="POST">
                            <input type="hidden" name="loc" value="E1" /><button
                                class="loc_button"
                            >
                                E1
                            </button>
                        </form>
                    </td>

I am sure that the input to PUG is the same. ie wineSelection Does the express server detect the client and render differently? Is there a way to force the render as if a Postman client?

gb53smith commented 4 years ago

Move to pugjs/pug