You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "Scott Wilson (JIRA)" <ji...@apache.org> on 2011/02/11 22:39:57 UTC

[jira] Commented: (WOOKIE-178) Result of widget.getWidgetTitle() can sometimes contain html span tags which may upset javascript code in jsps

    [ https://issues.apache.org/jira/browse/WOOKIE-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993717#comment-12993717 ] 

Scott Wilson commented on WOOKIE-178:
-------------------------------------

The HTML span tags are to ensure that text displays OK on the browser when it uses right-to-left alphabets or mixtures of LTR & RTL (e.g. a widget with an Arabic title containing an English word or acronym). I'm not sure about how this works when dealing with alert boxes - I think we could convert it to use the Unicode escape characters instead. (Either that or try to avoid having these labels turn up in alert boxes.)

> Result of widget.getWidgetTitle() can sometimes contain html span tags which may upset javascript code in jsps
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WOOKIE-178
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-178
>             Project: Wookie
>          Issue Type: Improvement
>          Components: Web Admin
>    Affects Versions: 0.9.1
>         Environment: Windows Vista sp2 firefox & Ie 8
>            Reporter: Paul Sharples
>            Assignee: Paul Sharples
>            Priority: Trivial
>             Fix For: 0.9.1
>
>
> The call to widget.getWidgetTitle() can result in the returned string containing HTML span tags
> <span style="unicode-bidi:embed; direction:ltr">You decide</span>
> Normally this would not be a problem, but there are instances where the result of that function call is passed to a javascript function within a jsp.  The jsps then have UI problems. As a temporary measure the code has been altered for 0.9.x so that the javascript functions receive only an empty string.(the value is only used in an alert box anyway)  An improvement would be to parse the result of the above function call and extract the text. 'You decide' and pass that to the javascript code.
> See jsp pages webcontent/admin/listall.jsp and webcontent/admin/listallfordelete.jsp

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira