For some of my feeds I had a requirement to strip out all the html tags except for the <p> tags.

I have added an additional field which appears when the strip tags is selected, the preserve tags field will appear to enter all the tags to be preserved, which is exactly the same as the "filtered html" filter where you enter the list of tags in the format of the strip_tags(). and example would be "<p> <br> <pre> <span>"

CommentFileSizeAuthor
#1 preserve_tags.patch1.64 KBgordon
preserve_tags.patch1.65 KBgordon

Comments

gordon’s picture

StatusFileSize
new1.64 KB

Just a quick cleanup of the patch

merlinofchaos’s picture

Assigned: gordon » dawehner

dereine, can you review this please?

dawehner’s picture

Assigned: dawehner » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs tests

* Looks fine.
* Manuel testing
* no settings => every tag get's stripped
* enabled single tag => single tag doesn't get stripped out

Such kind of functionality can be tested fine, so adding a test tag.

merlinofchaos’s picture

Question: What happens if hte user inputs something invalid. Does strip_tags complain or does it silently ignore the bad data?

gordon’s picture

It seems that strip_tags() just accepts the junk data and keeps going silently.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Needs review

gordon: Do you think we care? Should we validate the data or let it silently fail?

merlinofchaos’s picture

Assigned: Unassigned » merlinofchaos

Assigning to self so I make sure to see responses.

gordon’s picture

I don't think we need to care.

If you are using this feature you are going to test your settings to make sure you are getting the correct output, and if you don't care you will not be using this and you will not test the output to make sure you are getting what you want.

merlinofchaos’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)

Applied to 6.x-3.x -- needs porting to 7.x

dawehner’s picture

Status: Patch (to be ported) » Fixed

Ported.

Commited to the 7.x-3.x branch.

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.