0

how to change {} to ${} in quarkus qute?

there are some css,js in html.it error now. for example:

<style type="text/css">
            body\{background-color: #D0D9E0;\}
</style>
<script type="text/javascript">

$.ajax({
                    url: '/getUserinfo',
                    data: {accessToken: accessToken},
                    dataType: 'json', 
                    success: function(res) {
                        if(res.code == 200) {
                            layer.alert(JSON.stringify(res.data));
                        } else {
                            layer.alert(res.msg);
                        }
                    },
                    error: function(xhr, type, errorThrown){
                        return layer.alert("异常:" + JSON.stringify(xhr));
                    }
                });
</script>

69Naah
  • 11
  • 1
  • If you have a whitespace character around your `{` `}` characters, Qute should ignore them. So for example, instead of `body{...}` in your CSS, you can write `body { ... }` and it should be fine. – Ladicek Apr 13 '22 at 10:18
  • You can also try to use [unparsed character data](https://quarkus.io/guides/qute-reference#basic-building-blocks) block to mark the content that should be rendered but not parsed. – Martin Kouba Nov 08 '22 at 13:21

0 Answers0