Strip HTML

More
12 years 10 months ago #27158 by igcorreia
Strip HTML was created by igcorreia
I think this is a GENERAL PHP or MYSQL question but I will give it a try, after a Google searches couldn't get the answer, I am querying a table that stores info in HTML format and I have a product called "Style Modern" when I query for the word "style" it retrieves:

"<style>" and "Style Modern" what can I change in the PHP or the MYSQL in order for the query don't search in the HTML TAGS.

I am querying the Intro Text but it has been hard for me to get one right. Please lead me in the girth direction.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #27166 by ggppdk
Replied by ggppdk on topic Strip HTML
mmm, this makes me think / remember ...

why not use the search_index column in _flexicontent_items_ext table which is stripped of tags?

I remember that due to changes in search plugin , currently we wrongly do not use this column, which is stripped of HTML, and thus search can work properly.

I am cleaning-up plugin code and search / filter stuff now.


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #27214 by igcorreia
Replied by igcorreia on topic Strip HTML
Because, for me the SEARCH INDEX is not serialized so I can not call a specific field :/ In the search index I need to call the entire COLUMN.

another way is it easy or possible to :
after the search I have an Array of Items I want to in that Array to intercept it and strip the HTML form the fields and search inside it again?

For example I have an array called:

$result{1=> "<b>dog</b>" 2=>"bull" 2=>"<b>bull</b>"}

I wanted to search inside the $result for "b" the it should give me:
1 - bull
2 - bull

but beacouse there is a "<b>" in the dog key the result is:

1 - dog
2 - bull
3 - bull

If I can search in an array then I can solve the problem.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.326 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save