Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7432667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:29:37+00:00 2026-05-29T09:29:37+00:00

I have a small search engine for my news articles on my website, all

  • 0

I have a small search engine for my news articles on my website, all stored on MySQL.
These news articles are using HTML formatting: e.g. a href, b, u, etc….

When I search an article I made it only the first 100 characters are displayed, as in a preview.
However, some articles stop before the closing HTML tags are declared.

This creates a mess when viewing the search results as the HTML formatting is inaccurate.

How do I stop HTML from flowing out my searchResults div?

Should I create an iFrame?

Lee.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:29:38+00:00Added an answer on May 29, 2026 at 9:29 am

    I’d recommend inserting the entire article into your DOM (dynamically fetched so as to not slow the page load time), and using CSS overflow properties to truncate it as you like. That will also allow you to do things like showing a (more) complete preview on hover.

    The truncation is a concern of the display layer – conceptually, the preview is limited to the size of the preview box. So you shouldn’t be applying it at the model layer.

    Most people who implement these sorts of previews other ways do it via a manually written summary or don’t allow arbitrary HTML (BBCode is popular).

    Another option is to actually parse the article before truncation, and be gentler with it to maintain the well-formedness of your page.

    And yes, a frame is theoretically a choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small application in java which searches images using bing image search.
i want to implement a small search engine , i have index page where
I have a small search engine site and I was wondering if there was
I have small problem. I've coded a full website in php using CodeIgniter framework.
We have a small data set and would like to search through it in
I have small query today I happen to see when I typed a website
I have small database of business and their addresses. Using the Google Geocode API
What is the possible ways to control search engine reverence in MySQL? let us
I am trying to develop a complex textual search engine. I have thousands of
I have a small problem in retrieving characters using user variable in SQL The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.