0

Is there a way to strip html comments from the response ?

asked 2014-07-01 17:25:11 +0800

Macadoshis gravatar image Macadoshis flag of France
39
http://about.me/saad.benb...

updated 2014-07-02 09:50:47 +0800

Hi,

Is there a way to deactivate the auto-generated HTML comment, which is appended to each ZUL response by the zk servlet ? (see the html comment below)

<script type="text/javascript" src="/ssd/zkau/web/48244cbb/js/zk.wpd" charset="UTF-8">
</script>
<script type="text/javascript" src="/ssd/zkau/web/48244cbb/js/zul.lang.wpd" charset="UTF-8">
</script>
<!-- ZK 5.0.12 EE 2012110612 -->
…

Is there something such as a zk “strip comment” library-property to set in zk.xml, a context-param or a init-param for the zk servlet ? For example something similar to JSF technology :

<context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
</context-param>

I'm using both ZK EE 5.x and 6.x version.

Thanks in advance.

Regards,

Saad BENBOUZID

delete flag offensive retag edit

3 Answers

Sort by » oldest newest most voted
0

answered 2014-07-02 05:58:51 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2014-07-02 05:59:12 +0800

As I know, there is no such configuration in ZK so far. But I think the comment affects nothing. Because it seems it's the only HTML comment generated by zul.

link publish delete flag offensive edit
0

answered 2014-07-02 09:38:13 +0800

Macadoshis gravatar image Macadoshis flag of France
39
http://about.me/saad.benb...

As a matter of fact, our customer pointed this as a security flaw, because displaying zk version exposes the application to all publicly opened issues (http://tracker.zkoss.org/) related to this version, including major and minor security faults.

I think it might be an interesting feature for upcoming releases (?)

link publish delete flag offensive edit
0

answered 2014-07-02 12:13:43 +0800

Macadoshis gravatar image Macadoshis flag of France
39
http://about.me/saad.benb...

@hawk : I had an answer from the technical support. I repost it here so it can help someone else.

Since ZK 6.5.5, we have included a library-property that you can configure and decide if you wish to display the zk version. For your ZK 6 based app please upgrade to 6.5.5 and reference this document to set the property: http://books.zkoss.org/wiki/ZKConfigurationReference/zk.xml/TheLibraryProperties/org.zkoss.zk.ui.versionInfo.enabled.

I am not aware of any way not to display the version for ZK 5, I will take another look and let you know if I have something new on this.

Vincent Jian

The ZK Team

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2014-07-01 17:25:11 +0800

Seen: 15 times

Last updated: Jul 02 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More