Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Meta Tags Contribution - how to remove <br> chars


lee the bean

Recommended Posts

I've installed the Quick Meta Tags for SEO 1.0 contribution - which works a treat & I would recommend to anyone with little knowledge of PHP coding.

 

However, I would like to know if there is a simple method to remove or replace the annoying <br> (LF/CR) characters which along with the products_id text strings and the first 150 characters of the product description are used to compile the META TAGS/TITLE & DESCRIPTION.

 

I have used the <br> characters at the end of each line of text and new line to enable some simple formating within the product description.

Link to comment
Share on other sites

I've added two extra lines to remove the <br> chars from <TITLE> & <META NAME="description" CONTENT="

 

before line:

 

return ($Title);

 

add line:

 

$Title = str_replace('<br>', ' ', $Title);

 

 

and

 

before line:

return ($Description);

 

add line:

 

$Description = str_replace('<br>', ' ', $Description);

 

 

 

There, that wasn't so difficult was it. Confidence growing by the hour....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...