Jump to content
 

Odd characters


Recommended Posts

Martin you have duplicated the whitespace issue but not the

 
issue. You need to use the editor "Reply quoting this post" button. Also test the whitespace issue by editing it and you will see it all reappears.

 

Truffy, those buttons only show when javascript is enabled (perhaps unsurprisingly, they also only work with javascript enabled) They only add some frills to the editor most of which I think we are better off without or can be done with alternative standard bbcode (bold, underline, italic, colour, etc). The button I referred to is at the top of the topic and used to work fine. As indeed so did the editor.

 

The puzzling thing to me is that the ratings buttons work - I believe that they do use AJAX (which as I understand it is not quite javascript and only returns to the issuing server). It not being blocked by javascript removal.

Link to post
Share on other sites

  • RMweb Gold

 

Martin you have duplicated the whitespace issue but not the

 
issue. You need to use the editor "Reply quoting this post" button. Also test the whitespace issue by editing it and you will see it all reappears.

 

Truffy, those buttons only show when javascript is enabled (perhaps unsurprisingly, they also only work with javascript enabled) They only add some frills to the editor most of which I think we are better off without or can be done with alternative standard bbcode (bold, underline, italic, colour, etc). The button I referred to is at the top of the topic and used to work fine. As indeed so did the editor.

 

The puzzling thing to me is that the ratings buttons work - I believe that they do use AJAX (which as I understand it is not quite javascript and only returns to the issuing server). It not being blocked by javascript removal.

Hi Kenton,

 

Javascript off and "Replying quoting this post". A blank line below:

 

Posted without a preview.

 

Martin.

Link to post
Share on other sites

 

Would you care to register on the Templot Club forum at http://85a.co.uk/forum

 

And then make a test post. The editors on there are essentially similar to RMweb. The difference is that on there I can examine what your browser is actually putting in the database. I can't do that on RMweb.

 

Despite your protestations, it seems obvious that the problem is a setting in your browser. I don't get the same results without javascript, That's not to say the IPB code isn't just awful, but we can live with it, and the vast majority of RMweb members manage to do so.

Martin, will do so later - I need to get a couple of hours sleep before work. Thanks again for the interest. I'll add a few more details in the test post. It would be nice to get to the bottom of this but as said it isn't the end of the world and I've leaned to cope with it. Obviously if the appearance
 
is upsetting folk then it is a bigger issue.
Link to post
Share on other sites

  • RMweb Gold

Martin you have duplicated the whitespace issue but not the

 
issue. You need to use the editor "Reply quoting this post" button. Also test the whitespace issue by editing it and you will see it all reappears.

 

Truffy, those buttons only show when javascript is enabled (perhaps unsurprisingly, they also only work with javascript enabled) They only add some frills to the editor most of which I think we are better off without or can be done with alternative standard bbcode (bold, underline, italic, colour, etc). The button I referred to is at the top of the topic and used to work fine. As indeed so did the editor.

 

The puzzling thing to me is that the ratings buttons work - I believe that they do use AJAX (which as I understand it is not quite javascript and only returns to the issuing server). It not being blocked by javascript removal.

Javascript off and "Replying quoting this post". A blank line below:

 

Posted with a preview first.

 

Martin.

Link to post
Share on other sites

  • RMweb Gold

Martin, will do so later

 

Hi Kenton,

 

I'm sorry, I now realise that those editors won't work at all without javascript. I did know that, but forgot. Sorry to have misled you.

 

Maybe IPB isn't so bad after all?

 

Martin.

Link to post
Share on other sites

 

Hi Kenton,

 

I'm sorry, I now realise that those editors won't work at all without javascript. I did know that, but forgot. Sorry to have misled you.

 

Maybe IPB isn't so bad after all?

 

Martin.

 

 

So, do you still want to go ahead with the templot test?

 

The editor(s) - there should only be one set of code handling the post translation - do work - just do different things with the data. I can post with both editors (obviously) and they can be worked around at some considerable cost and having to remember how to cheat them. All of which could be simple to fix in the code as much as it was evidently simple to break. However, it can only be fixed in the code if IPB can see it as a real issue and can care. They do not listen to mere users only those who purchase the software (perhaps) even then they don't really seem to care.

Link to post
Share on other sites

  • RMweb Gold

So, do you still want to go ahead with the templot test?

 

No, you won't be able to post anything on Templot Club without turning javascript on.

 

The puzzling thing is that I can post on RMweb with javascript turned off, without seeing any HTML tags inserted in the text. It would be interesting to see what is in the database for your posts and mine, to compare the two. But only Andy has that access (via phpMyAdmin in cPanel, Andy).

 

regards,

 

Martin.

Link to post
Share on other sites

A screen grab from just clicking reply to your post. clearly shows the clutter of html non-break spaces dropped into the text box.

2013-11-05_204646.jpg

They are not removed/cleaned from the post during posting either (see next post) so presumably are deposited in the database for all to see.

Link to post
Share on other sites

 

No, you won't be able to post anything on Templot Club without turning javascript on.

 

The puzzling thing is that I can post on RMweb with javascript turned off, without seeing any HTML tags inserted in the text. It would be interesting to see what is in the database for your posts and mine, to compare the two. But only Andy has that access (via phpMyAdmin in cPanel, Andy).

 

regards,

 

Martin.

 
Link to post
Share on other sites

  • RMweb Gold

Hi Kenton,

 

Ok, I am now seeing the same as you when quoting with javascript off. An interesting difference is that I have the "No javascript" warning message (Firefox 26):

 

post-1103-0-32621500-1383717917.png

 

That may be related to the "No referrer" setting showing in your status bar.

 

Next post will be the result of posting it without javascript.

 

Martin.

Link to post
Share on other sites

  • RMweb Gold

 

No, you won't be able to post anything on Templot Club without turning javascript on.

 

The puzzling thing is that I can post on RMweb with javascript turned off, without seeing any HTML tags inserted in the text. It would be interesting to see what is in the database for your posts and mine, to compare the two. But only Andy has that access (via phpMyAdmin in cPanel, Andy).

 

regards,

 

Martin.

 

 

Posting with javascript off.

A new line. A blank line below:

 

Another line.

edit: an inserted line.

 

Martin.

Link to post
Share on other sites

  • RMweb Gold

Ok, there is a bug in quoted text with javascript off -- & characters are being changed to & even when they are part of the HTML and not entered text. So   in the code becomes   and is therefore invalid HTML and rendered literally by the browser.

 

This is a parsing error in the blockquote class. It will take some finding because here is the relevant javascript function for the quote boxes -- none of this is executed with javascript off.

 

On balance my conclusion is that the simplest solution is to turn javascript on. 99% of users do that, and live to tell the tale.

 

 

/* Make quote boxes all nice */

    parseQuoteBoxes: function()
    {
        $$('blockquote.ipsBlockquote').each( function( el )
        {
            if ( ! $(el).hasClassName('built') )
            {
                var author    = '';
                var cid       = '';
                var time      = 0;
                var date      = '';
                var collapsed = 0;
                var _extra    = '';
                var _a        = new Element('span');
                
                try {
                    author    = $(el).getAttribute( 'data-author' )    ? $(el).getAttribute( 'data-author' ).escapeHtml() : '';
                    cid       = $(el).getAttribute( 'data-cid' )       ? $(el).getAttribute( 'data-cid' ).escapeHtml()       : '';
                    time      = $(el).getAttribute( 'data-time' )      ? $(el).getAttribute( 'data-time' ).escapeHtml()      : 0;
                    date      = $(el).getAttribute( 'data-date' )      ? $(el).getAttribute( 'data-date' ).escapeHtml()      : '';
                    collapsed = $(el).getAttribute( 'data-collapsed' ) ? $(el).getAttribute( 'data-collapsed' ).escapeHtml() : 0;
                } catch( aCold ) { }
                
                if ( time )
                {
                    if ( time == parseInt( time ) && time.length == 10 )
                    {
                        /* First, determine if we are in DST now */
                        var _tz   = new Date().getTimezoneOffset() * 60;

                        /* Find out if timestamp was in DST */
                        var _date = new Date().getDateAndTime( parseInt( time ) );

                        /* If there isn't a match, figure out the DST offset and then add it back in */
                        if( _date['dst'] * 60 != _tz )
                        {
                            _tz    = _tz - _date['dst'] * 60;
                            _date = new Date().getDateAndTime( parseInt( time ) - parseInt( _tz ) );
                        }

                        var _ampm = '';

                        if( ipb.vars['hour_format'] == "12" )
                        {
                            if( _date['hour'] > 12 )
                            {
                                _date['hour']    -= 12;
                                _ampm            = ' ' + ipb.lang['date_pm'];
                            }
                            else if( _date['hour'] == 12 )
                            {
                                _ampm            = ' ' + ipb.lang['date_pm'];
                            }
                            else if( _date['hour'] == 0 )
                            {
                                _date['hour']    = 12;
                                _ampm            = ' ' + ipb.lang['date_am'];
                            }
                            else
                            {
                                _ampm            = ' ' + ipb.lang['date_am'];
                            }
                        }

                        date      = _date['date'] + ' ' + _date['monthName'] + ' ' + _date['year'] + ' - ' + _date['hour'] + ':' + _date['min'] + _ampm;
                    }
                }
                
                if ( author && date )
                {
                    _extra = ipb.lang['quote__date_author'].replace( /#name#/, author ).replace( /#date#/, date );
                }
                else if ( author )
                {
                    _extra = ipb.lang['quote__author'].replace( /#name#/, author );
                }
                
                /* finally.. */
                if ( _extra.length == 0 )
                {
                    _extra = ipb.lang['quote_title'];
                }
                
                if ( cid && parseInt( cid ) == cid )
                {
                    _a = new Element( 'a', { 'class': 'snapback right', rel: 'citation', href: ipb.vars['board_url'] + '/index.php?app=forums&module=forums&section=findpost&pid=' + cid } );
                    _a.update( new Element( 'img', { src: ipb.vars['img_url'] + '/snapback.png' } ) );
                }
                
                el.insert( { before: new Element( 'p', { 'class': 'citation' } ).update( _extra ).insert( _a ) } );
                
                try
                {
                    el.down('cite').hide();
                }
                catch(err){}
                
                el.addClassName( 'built' );
                
                if ( collapsed )
                {
                    el.down('p').hide();
                    el.down('div').hide();
                    el.insert( new Element( 'p', { 'class': '___x clickable' } ).update( ipb.lang['quote_expand'] ) );
                    
                    el.down('p.___x').on( 'click', function( e, elem )
                    {
                        elem.up('blockquote').down('p').show();
                        elem.up('blockquote').down('div').show();
                        elem.hide();
                    } );
                }
            }
        } );
    },
 
 

 

That is executed in javascript on the client side rather than php on the server so that the quoted section remains neat while the user is editing it.

 

Martin.

Link to post
Share on other sites

  • RMweb Gold

 

That worked ok. The error is in the quoted section only.I will now try editing it without javascript.

 

 

I'm intrigued by this, as I use No-Script in Firefox, so I thought I'd try posting in reply to Martin's earlier comment with RMWeb blocked (I normally allow it).

 

As you have mentioned, the HTML formatting appears in the edit box for the quoted portion of text. I'll be interested to see if it removes all formatting from this reply.

 

Al.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...