Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZK-5629: group title doesn't render single quote as expected #3138

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions zktest/src/main/webapp/test2/B100-ZK-5629.zul
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
B100-ZK-5629.zul

Purpose:

Description:

History:
2024/1/30, Created by jumperchen

Copyright (C) 2024 Potix Corporation. All Rights Reserved.

-->
<zk>
<label multiline="true">
You should see the title of the groupbox should be "Drawer's position".
</label>
<groupbox title="Drawer's position" >
</groupbox>
</zk>
1 change: 1 addition & 0 deletions zktest/src/main/webapp/test2/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3119,6 +3119,7 @@ B90-ZK-4431.zul=A,E,Multislider
##zats##B100-ZK-5605.zul=A,E,clientbind,widget
##zats##B100-ZK-5480.zul=A,E,cascader,selection,label
##zats##B100-ZK-4355.zul=A,E,timebox,col,default
##zats##B100-ZK-5629.zul=A,E,groupbox,title,encodeXML

##
# Features - 3.0.x version
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* B100_ZK_5629Test.java

Purpose:

Description:

History:
9:26 AM 2024/1/30, Created by jumperchen

Copyright (C) 2024 Potix Corporation. All Rights Reserved.
*/
package org.zkoss.zktest.zats.test2;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import org.zkoss.test.webdriver.WebDriverTestCase;

/**
* @author jumperchen
*/
public class B100_ZK_5629Test extends WebDriverTestCase {
@Test
public void test() {
connect();
waitResponse();
assertEquals("Drawer's position", jq(".z-groupbox-title-content").text());
}
}
8 changes: 4 additions & 4 deletions zul/src/main/resources/web/js/zul/wgt/mold/groupbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ it will be useful, but WITHOUT ANY WARRANTY.
function groupbox$mold$(out, skipper) {
var uuid = this.uuid,
cap = this.caption,
title = this.getTitle();
title = title && !cap ? zUtl.encodeXML(title) : undefined;
title = this.getTitle(),
titleHTML = title && !cap ? zUtl.encodeXML(title) : undefined;

out.push('<div ', this.domAttrs_(), '>');

if (title || cap) {
if (titleHTML || cap) {
out.push('<div id="', uuid, '-header" class="', this.$s('header'),
(this._closable ? '' : ' ' + this.$s('readonly')), '">');
if (cap)
cap.redraw(out);
else
out.push('<div id="', uuid, '-title" class="', this.$s('title'),
'" role="none"><div id="', uuid, '-title-cnt" class="',
this.$s('title-content'), '" role="none">', zUtl.encodeXML(title), '</div></div>');
this.$s('title-content'), '" role="none">', titleHTML, '</div></div>');
out.push('</div>');
}

Expand Down
Loading