HTML Macro Not Showing Content

Hey
Currently running Xwiki 12.3 in Docker-Compose with postgres-tomcat.
We seem to have issues when trying to use the HTML macro.

What we are trying to do.
We want to be able to edit/update code in our Gitlab and have that auto refresh on the wiki page.

When selecting the HTML macro we enter the following lines of code.

<script src="https://gitlab-server.com/snippets/10.js"></script>

This just gives us nothing back.

If we try something like the following

<script src="https://gitlab-server.com/snippets/10.js" />

Then we see the code for a split second when refreshing the page other then that shows blank.
We tried adding to the code but doesn’t seem to help. Any suggestions ?

Hi, see https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial/ since putting script in html body is not recommended. If you still want to do that use the ‘clean=false’ parameter of the html macro.

Looks like if I do something like the following seems to work most of the time. I have come across one page where it seems not to work. Shows in preview mode but doesn’t show when saved.

I’ve also tried with clean=false

{{html}}
<h1>The script src attribute</h1>

<script src="https://my-server.com/snippets/10.js">
</script>
{{/html}}

We also noticed a White-space issue were multi extra lines were getting added to the script. We solved the issue by changing CSS from white-space:pre to white-space:inherit.
found here

/usr/local/tomcat/webapps/ROOT/skins/flamingo/less/general.less

It should always work if you use clean=false. You could also check the browser’s javascript console for errors.

Not sure what you mean here. Would need an example to tell you more. Just note that white spaces and new lines are significant in XWiki (they’re honored). So if you 2 NLs you’ll see 2NLs in the rendered HTML. Same for spaces. That’s the normal behavior of XWiki.

Is there was to display snapshot photo’s of what im seeing ?

WDYM? You can take a screenshot and attach it here.

So basically the end of the file should have

printf "Voip Url: "
adb shell getprop some.url

Instead there is the added in lines at the bottom of the script.

printf "Voip Url: "
adb shell getprop some url




If we change the white spacing it will show correctly.

Here is screen shot of in edit mode with WYSIWYG

Then when saved or in Preview mode.

Not really sure if that is correct behavior or not.