On 26 May 2017 at 22:33, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Mark, > > On 5/26/17 6:59 AM, Mark Thomas wrote: > > On 26/05/17 10:15, David Kavanagh wrote: > >> Hey guys, > >> > >> Thanks for getting back to me. I didn't realise that the > >> attachments would be stripped.> Here are the two files in full. > > > > That isn't enough for us to reproduce it. Those files refer to a > > handful of other tag files and classes we don't have. > > > > However, I have been able to derive a simple test case from it: > > > > =====start====== <p class="${'foo'} ${'bar'}">This is a test</p> > > ======end======= > > > > The output with trimSpaces enabled is: > > > > =====start====== <p class="foobar">This is a test</p> > > ======end======= > > > > trimSpaces is behaving exactly as designed. It removes any blocks > > of template text that consist solely of white space. > > > > What you have is: TemplateText [<p class="] Expression > > [${'foo'}] TemplateText [ ] Expression [${'bar'}] TemplateText > > [">This is a test</p>] > > > > Because the second template text is empty, it gets removed. > > > > The fix is: > > > > =====start====== <p class="${'foo'}${' '}${'bar'}">This is a > > test</p> ======end======= > > > > This is a potential use case for a recently closed (as WONTFIX) > > enhancement request: > > > > https://bz.apache.org/bugzilla/show_bug.cgi?id=45931 > > > > Whether this use case is sufficient to justify re-opening that > > enhancement request, reviewing the patch and updating it for 9.0.x > > is TBD. How realistic is it for you to apply the fix (using ${' > > '}) described above? > > Would it be reasonable to change trimSpaces so that spaces within > element attributes would be normalized to a single space, and others > would be removed? I'm not sure how aware the parser is of the > surrounding document structure. > > - -chris > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlkokS8ACgkQHPApP6U8 > pFiW1A/+LnfMx+8SfU0TkGuhfxiKxh4kfdX+Hn4XNjJbcyAqTuPnwBD3D1kfXB6r > QajDBPlEj9vKQgRZhdEuYpj/fMRxqxrdcwMR0ImjWhb4dm7q6ZxsDnWdWqzI3GF+ > ltYQ4Oql+NmCLkXMxZOF6JMUVJGWcj+wQnCuwWp5UvRzFhZTzevcz9H+35TPPa3z > t+oX2ZjnAPXXVI+C8fnJ5qrdm6Ovj853BzQteR40vB6zwk8CDkyWhN98XEBz1DrD > QMQTXe0VHa6B0cgrrNLna6K3S5FwolnQJS6xA2AKHMR8ugoAukBGJjBHntAo9NAH > XvR+5Wxx/Iecc/9Cw/YuKgFzExEKQvU7Nj9EhuUrTIDKVGYMEG8rg2iEkRtqjd8T > sQptiIt/kHoRSsatfSP1RzqhTVsbOJrATEQdoas5Tzn0rSKwXZkGPe7iHH/hHAlI > EREd25F6zHHKJL6Vugw7UidRtqIg8htg2EwhgDstx/gw334L9xB//KnrMWM+ErDf > gZkEPrE2tXzeu7hkDvpWVxERN9mMx6UT7uEUgG7csTBdKPh2snBBhJzSsKX2GyS6 > /OPXwzfFdD526rI5ZgzSzGbuC4Z1TAHjtBBnLWsstIjZtIRq+SKFGl15gfNxj0PQ > KYc9uvoduFfUspT7eRaEk1DbkUBidA/sfhmPMgove3XVq+u5/SM= > =gYLg > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > Hey guys, Thanks again for the help. For the Tomcat setup we currently have, the first link sent my Mark is a good fix for us. The other option Mark posted that would require modifying the .jsp files is unfortunately not realistic because we currently use thousands of .jsps. The possible fix that Christopher suggested in the last message would be the perfect solution. Kind Regards David