Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Issue with CExtRichContentScrollWnd and HTML Collapse All
Subject Author Date
Darlene Gariepy Nov 18, 2011 - 1:46 PM

There appears to be a bug in the parsing algorithm for CExtRichContentScrollWnd when parsing HTML.  If a quotation is used as the first character in an HTML tag (bold, italic, etc), the contents of the tag is not shown.  For example, we have the following text to parse into HTML: <b>"test"</b> I would expect "test" to be shown in the CExtRichContentScrollWnd in bold.  However, nothing is displayed.  If a space (or any other character) is placed before the first quotation, the text is correctly parsed and shown in the window.


We are currently using version 2.92.


 

Technical Support Nov 24, 2011 - 8:49 AM

Thank you for reporting this issue. Please find the following text in the .../Prof-UIS/Src/ExtRichContent.cpp file:

( (*p) == _T(’<’) )
 

You will find it as part of a big compound if conditional statement inside the CExtRichContentLayout::ParseHTML() method:
        if(        (    (!bInsideTag)
                 &&    ( (*p) == _T(’<’) )
                 &&    (    ( (_T(’A’)<=(*(p+1))) && ((*(p+1))<=_T(’Z’)) )
                     ||    ( (_T(’a’)<=(*(p+1))) && ((*(p+1))<=_T(’z’)) )
                     ||    ( (*(p+1)) == _T(’/’) )
                      ||    ( (*(p+1)) == _T(’!’) )
                     )
                 )
             ||    (    bInsideTag
                 &&    (    (    (*p) == _T(’>’)
                         &&    (    (*(p+1)) != _T(’\"’)
                             &&    (*(p+1)) != _T(’\’’)
                                 )
                             )
                     ||    (    (*p) == _T(’/’) 
                         &&    (    (*(p+1)) == _T(’>’) 
                             &&    (    (*(p+2)) != _T(’\"’)
                                 &&    (*(p+2)) != _T(’\’’)
                                     )
                                 )
                         )
                     )
                 )
             )
 

Please comment three lines there:
        if(        (    (!bInsideTag)
                 &&    ( (*p) == _T(’<’) )
                 &&    (    ( (_T(’A’)<=(*(p+1))) && ((*(p+1))<=_T(’Z’)) )
                     ||    ( (_T(’a’)<=(*(p+1))) && ((*(p+1))<=_T(’z’)) )
                     ||    ( (*(p+1)) == _T(’/’) )
                      ||    ( (*(p+1)) == _T(’!’) )
                     )
                 )
             ||    (    bInsideTag
                 &&    (    (    (*p) == _T(’>’)
 //                        &&    (    (*(p+1)) != _T(’\"’)
 //                            &&    (*(p+1)) != _T(’\’’)
 //                                )
                             )
                     ||    (    (*p) == _T(’/’) 
                         &&    (    (*(p+1)) == _T(’>’) 
                             &&    (    (*(p+2)) != _T(’\"’)
                                 &&    (*(p+2)) != _T(’\’’)
                                     )
                                 )
                         )
                     )
                 )
             )
 

This will fix the quote character support issue.