Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Piece of text problems --- how to best handlePiece of text problems --- how to best handle
Previous
 
Next
New Post
2/13/2007 12:37 AM
 

I am moving along very nicely on my new site and am hoping to have something to show off in a few weeks for everyone but i ran into a kind of wierd problem that I have had before but would like to make an effort to fix this time around.

I have postings of info and allow the users to use the fck editor in its simplest toolbar mode to add description text to the post - I have a listing of posts where i might pull the first 200 or so characters and display those so people can get a preview of the post

THE PROBLEM - Sometimes when choosing those 200 or so characters i get inbetween the open and close tag in some html and the formating is all wierd and goofy - can someone give me a good solution on how that is fixed in other sites that may do the same thing ? In the past i just ignored it for the most part but I would like to learn how to fix it .

TIA


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
2/13/2007 10:43 AM
 
I have seen a few different methods to fix this type of issue.  The first is to simply remove any HTML tags that are found.  The second is to parse the text and keep track of which tags haven't been closed and automatically close the tags after the summary if needed.

I am not sure of the other methods out there to accomplish this.

-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
2/13/2007 12:01 PM
 
Okay - anybody got a nice function to strip the html tags out of a string of text?

Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
2/13/2007 12:42 PM
 
Look in the core "HtmlUtils" class - as we strip the html from text to be indexed for search.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Piece of text problems --- how to best handlePiece of text problems --- how to best handle


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out