[gatein-issues] [JBoss JIRA] (GTNPORTAL-3290) IE9: Action does not work when page url contains special characters
Tran Trung Thanh (JIRA)
issues at jboss.org
Wed Jan 15 21:20:33 EST 2014
[ https://issues.jboss.org/browse/GTNPORTAL-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tran Trung Thanh updated GTNPORTAL-3290:
----------------------------------------
Description:
In IE9, when page URL contains special characters, if we click to an action, it does not work.
Steps to reproduce:
# Open IE9, go to portal/intranet/wiki
# Create wiki page with name: 'avião árido joão café'
# Save and close
# Edit again
# Switch to Richtext mode -> does not work.
I add this code fragment in *ajaxPost* method of *UIForm.js* and it works well (but it is not the full solution because I encode only the page name, not the whole url):
{code}
if ($.browser.msie != undefined) {
var q = url.indexOf('?');
var s1 = "";
var s2 = "";
if (q > -1) {
s1 = url.substring(0, q);
s2 = url.substring(q);
} else {
q1 = ajaxGetLink.indexOf('#');
if (q1 > -1) {
s1 = url.substring(0, q1);
s2 = url.substring(q1);
} else {
s1 = url;
s2 = "";
}
}
var slash = s1.lastIndexOf('/');
if (slash > -1) {
var pageName = s1.substring(slash + 1);
url = s1.substring(0, slash) +'/' + encodeURIComponent(pageName) + s2;
}
}
{code}
This issue fixes also problem in Tab
# Create new tab whose name contains accent character
# Access it -> Cannot access
was:
In IE9, when page URL contains special characters, if we click to an action, it does not work.
Steps to reproduce:
# Open IE9, go to portal/intranet/wiki
# Create wiki page with name: 'avião árido joão café'
# Save and close
# Edit again
# Switch to Richtext mode -> does not work.
I add this code fragment in *ajaxPost* method of *UIForm.js* and it works well (but it is not the full solution because I encode only the page name, not the whole url):
{code}
if ($.browser.msie != undefined) {
var q = url.indexOf('?');
var s1 = "";
var s2 = "";
if (q > -1) {
s1 = url.substring(0, q);
s2 = url.substring(q);
} else {
q1 = ajaxGetLink.indexOf('#');
if (q1 > -1) {
s1 = url.substring(0, q1);
s2 = url.substring(q1);
} else {
s1 = url;
s2 = "";
}
}
var slash = s1.lastIndexOf('/');
if (slash > -1) {
var pageName = s1.substring(slash + 1);
url = s1.substring(0, slash) +'/' + encodeURIComponent(pageName) + s2;
}
}
{code}
> IE9: Action does not work when page url contains special characters
> -------------------------------------------------------------------
>
> Key: GTNPORTAL-3290
> URL: https://issues.jboss.org/browse/GTNPORTAL-3290
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.6.Final
> Reporter: Tran Trung Thanh
>
> In IE9, when page URL contains special characters, if we click to an action, it does not work.
> Steps to reproduce:
> # Open IE9, go to portal/intranet/wiki
> # Create wiki page with name: 'avião árido joão café'
> # Save and close
> # Edit again
> # Switch to Richtext mode -> does not work.
> I add this code fragment in *ajaxPost* method of *UIForm.js* and it works well (but it is not the full solution because I encode only the page name, not the whole url):
> {code}
> if ($.browser.msie != undefined) {
> var q = url.indexOf('?');
> var s1 = "";
> var s2 = "";
> if (q > -1) {
> s1 = url.substring(0, q);
> s2 = url.substring(q);
> } else {
> q1 = ajaxGetLink.indexOf('#');
> if (q1 > -1) {
> s1 = url.substring(0, q1);
> s2 = url.substring(q1);
> } else {
> s1 = url;
> s2 = "";
> }
> }
> var slash = s1.lastIndexOf('/');
> if (slash > -1) {
> var pageName = s1.substring(slash + 1);
> url = s1.substring(0, slash) +'/' + encodeURIComponent(pageName) + s2;
> }
> }
> {code}
> This issue fixes also problem in Tab
> # Create new tab whose name contains accent character
> # Access it -> Cannot access
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list