Smarty How to filter out redundant code

Source: Internet
Author: User
Tags php source code
I just want to take out a piece of plain text, flat and limit the number of words, how to write
This is my code.

{$val [Message]|strip_tags}

Like Strip_tags doesn't work, (Dz3 's template)

Below is what is read out.
[font= song body] said yesterday evening out to eat dinner home, is riding my human donkey on the road, suddenly a look up, a good magical scene, the east out of a white snow-capped snow! [/font]           

[Font=] Remember the last time I saw such a scene or in [/font]n[font=] years ago in the primary school, then, then my mother rode the car [/font]

[font= song body] go east, a crooked head, south of the sky is a huge cloud, the edge of the cloud as the mountain peak as rolling, cloud color is shallow down deep, as if the stone Mountain covered with a layer of snow, like a huge mountain mountains, the level is clear, coupled with the sunset of the map, more brilliant , it was only a pity that the wood had the equipment to photograph, and failed to record that beautiful moment. [/font]

[font= song body] Finally, also called me to see this spectacular scenery, but this time for a direction, but also a lot of, but this time the cloud is not a long time ago that the level is clear, but it appears a lot of haze, as if there is something in front of the sun, no matter how, such a cloud, it is rare to see. [/font]

[Align=left] [font= Song body] [attach]26573[/attach][/font][/align][align=left][font= song Body][attach]26575[/attach]




Reply to discussion (solution)

First?? HTML, and then use Strip_tags ();?? Drop HTML

? In the [font= song body]? How about a method? HTML bar.

DZ in |strip_tags not at all resolved
Is there any way to filter with formal list

It's not much of a relationship with your piece of code.
Smarty Inside
To generate this stuff in the PHP source code to remove HTML and interception.

DZ inside don't know, did not study

Strip_tags won't work on your UBB code.





{$content}

Thanks, Wander_wind.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.