- You are here:
- Main › Forum › Bug Tracker
[cBB Blockgets 1.0.3] Bug with title="" inside Recent topics
16 posts
• Page 1 of 2 • 1, 2
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Mon Oct 29, 2012 10:09 pm • via Web
Hello,
I found a bug with Recent topics block. If my item has a title="" attribute which contains one or more apostrophes ( " ), it breaks xhtml validation and "cut" the title="".
For example, we can have something like title="I felt "stupid" yesterday". Well, I think we should have title="I felt 'stupid' yesterday".
Am I enough clear in my poor explaination ?
I found a bug with Recent topics block. If my item has a title="" attribute which contains one or more apostrophes ( " ), it breaks xhtml validation and "cut" the title="".
For example, we can have something like title="I felt "stupid" yesterday". Well, I think we should have title="I felt 'stupid' yesterday".
Am I enough clear in my poor explaination ?
Last edited by Mathieu M. on Tue Nov 27, 2012 11:21 am, edited 2 times in total.
- IvanPF
- Administrator
- Posts: 2010
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Tue Oct 30, 2012 1:29 pm • via Web
My apologies but my English is very bad and I don't understand.
I revise the template of news block and I don't find any "title" tag with custom text inside.
I think that a screenshot help me to understand.
I revise the template of news block and I don't find any "title" tag with custom text inside.
I think that a screenshot help me to understand.
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Tue Oct 30, 2012 1:58 pm • via Web
Look at this scrrenshot :
My first <a> tag called "Paris-Bercy-Benneteau: "Même des handballeurs n..." has a title attribute (the entire topic subject) with an apostrophe ( " ). But if you look at the tooltip (and in the code source too), you see "Paris-Bercy-Benneteau: "".
The apostrophe in title attribute breaks everything... It's why I suggested to replace apostrophe ( " ) by a simple apostrophe ( ' )
Am I more clear in my explainations ?
Thanks !
My first <a> tag called "Paris-Bercy-Benneteau: "Même des handballeurs n..." has a title attribute (the entire topic subject) with an apostrophe ( " ). But if you look at the tooltip (and in the code source too), you see "Paris-Bercy-Benneteau: "".
The apostrophe in title attribute breaks everything... It's why I suggested to replace apostrophe ( " ) by a simple apostrophe ( ' )
Am I more clear in my explainations ?
Thanks !
- IvanPF
- Administrator
- Posts: 2010
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Tue Oct 30, 2012 2:25 pm • via Web
Ok Ok.
But the problem is in recent topics block and not in news block. For this I don't find the error.
What browser do you use? In Google Chrome the title shows correctly with " because the block put " and not "
To solve the problem:
1. Open /blockgets/block/recent_topics_block.php
2. Find:
3. Replace with:
Thanks for the report.
But the problem is in recent topics block and not in news block. For this I don't find the error.
What browser do you use? In Google Chrome the title shows correctly with " because the block put " and not "
To solve the problem:
1. Open /blockgets/block/recent_topics_block.php
2. Find:
- Code: Select all
'FULL_TITLE' => $row['topic_title'],
3. Replace with:
- Code: Select all
'FULL_TITLE' => str_replace('"', "'", $row['topic_title']),
Thanks for the report.
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Tue Oct 30, 2012 6:31 pm • via Web
Admin wrote:But the problem is in recent topics block and not in news block. For this I don't find the error.
Oops sorry, my mistake
Admin wrote:What browser do you use? In Google Chrome the title shows correctly with " because the block put " and not "
I use Firefox 16, but the problem is the same with Google Chrome for me.
Admin wrote:3. Replace with:
- Code: Select all
'FULL_TITLE' => str_replace('"', "'", $row['topic_title']),
Well, it works only if I replace with :
- Code: Select all
'FULL_TITLE' => str_replace('"', "'", $row['topic_title']),
Admin wrote:Thanks for the report.
Thanks for all your hard work
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Tue Nov 27, 2012 11:22 am • via Web
Hello,
This bug hasn't be resolved in cBB Blockgets 1.0.3
Open : recent_topic_blocks.php
Find :
Replace with :
There's the same problem in topic_index_block.php :
Find :
Replace with :
This bug hasn't be resolved in cBB Blockgets 1.0.3
Open : recent_topic_blocks.php
Find :
- Code: Select all
'FULL_TITLE' => str_replace(array('"', '"'), "'", $row['topic_title']),
Replace with :
- Code: Select all
'FULL_TITLE' => str_replace(array('"', '"'), "'", $row['topic_title']),
There's the same problem in topic_index_block.php :
Find :
- Code: Select all
'FULL_TITLE' => str_replace('"', "'", $row['topic_title']),
Replace with :
- Code: Select all
'FULL_TITLE' => str_replace('"', """, $row['topic_title']),
- IvanPF
- Administrator
- Posts: 2010
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Tue Nov 27, 2012 12:05 pm • via Web
I dont understand this.
In the first, you change " and " to '
But, in the second, you replace " to " and not to '
PD: array('"', '"'), "'" and array('"', '"'), "'" is the same. In the two cases all " and " are converted to '
In the first, you change " and " to '
But, in the second, you replace " to " and not to '
PD: array('"', '"'), "'" and array('"', '"'), "'" is the same. In the two cases all " and " are converted to '
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Tue Nov 27, 2012 12:21 pm • via Web
Oops sorry, it's my mistake (I used "copy/paste" a bit too fast...)
In the both case, I have to replace with :
In this way, the double apostrophe (") is converted to its HTML entity. If we don't do it, it breaks XHTML validation and breaks the title attribute.
In the both case, I have to replace with :
- Code: Select all
'FULL_TITLE' => str_replace('"', """, $row['topic_title']),
In this way, the double apostrophe (") is converted to its HTML entity. If we don't do it, it breaks XHTML validation and breaks the title attribute.
- IvanPF
- Administrator
- Posts: 2010
- Joined: Fri Jun 17, 2011 12:15 am
- Location: España (Spain)
Tue Nov 27, 2012 12:37 pm • via Web
In my case, use str_replace('"', """, $row['topic_title']), or use directly $row['topic_title'] produces the same effect.
In the browser appears as " in the two cases. In the database, " is saved as " always.
What is your database? (mysql, mysqli, mssql...)
In the browser appears as " in the two cases. In the database, " is saved as " always.
What is your database? (mysql, mysqli, mssql...)
- Mathieu M.
- Posts: 45
- Joined: Mon Oct 15, 2012 11:55 am
Tue Nov 27, 2012 1:32 pm • via Web
I've mysqli DB
Perhaps it's a Firefox issue, but in my case, " isn't convert to " with current 1.0.3.
PS: My problem with js and css header files is solved with a clean and fresh installation on my website.
Perhaps it's a Firefox issue, but in my case, " isn't convert to " with current 1.0.3.
PS: My problem with js and css header files is solved with a clean and fresh installation on my website.
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 0 guests
- External Links
- phpBB Official
- phpBB Official (Spanish)
- Raul Arroyo Monzo
- PasionReef
- About CaniDev
- Terms of use
- Privacy Policy
- About Us
- Contact
- © 2011-2024 CaniDev