Filter HTML contents of a sql query

hello,

can anyone tell me if can i filter html tags from a text , which i get from a sql query.
Does lua have anything like that??

please help guys!
Thanks! [import]uid: 185094 topic_id: 35036 reply_id: 335036[/import]

Hello,
Do you mean searching a text string for HTML tags and removing them? You could accomplish that with string matching/replace, i.e. string.gsub().

http://docs.coronalabs.com/api/library/string/gsub.html

Brent [import]uid: 200026 topic_id: 35036 reply_id: 139356[/import]

exactly brent… i used SQL REPLACE function instead… i think is a similar way for achieving that. i wonder if there is a function for removing the html automaticaly… that would be nice… [import]uid: 185094 topic_id: 35036 reply_id: 139436[/import]

Hi @bvagdas,
If you write a simple filtering routine for this, can you please post it in the Code Share? I’d think it should be fairly easy, if you’re talking about just getting rid of standard HTML tags enclosed in <> hashes. Getting rid of special characters like " " would probably be simple too.

Brent [import]uid: 200026 topic_id: 35036 reply_id: 139503[/import]

Hello,
Do you mean searching a text string for HTML tags and removing them? You could accomplish that with string matching/replace, i.e. string.gsub().

http://docs.coronalabs.com/api/library/string/gsub.html

Brent [import]uid: 200026 topic_id: 35036 reply_id: 139356[/import]

exactly brent… i used SQL REPLACE function instead… i think is a similar way for achieving that. i wonder if there is a function for removing the html automaticaly… that would be nice… [import]uid: 185094 topic_id: 35036 reply_id: 139436[/import]

Hi @bvagdas,
If you write a simple filtering routine for this, can you please post it in the Code Share? I’d think it should be fairly easy, if you’re talking about just getting rid of standard HTML tags enclosed in <> hashes. Getting rid of special characters like " " would probably be simple too.

Brent [import]uid: 200026 topic_id: 35036 reply_id: 139503[/import]