ID:157194
Apr 26 2010, 7:46 pm
|
|
I want to have a filter that can pull text from the browser and if forbidden text is found, it replaces it...How would I go about doing this?
|
In response to Garthor
|
|
Garthor wrote:
You can intercept some links via client/Topic(). However, any links within a page or typing a URL directly isn't going to do jack. China has an alternate key. :D If you're looking to replace text, make a list of the words and then use a library like TextHandling to go through each element of the list and replace as needed. |
BananasInPajamas wrote:
I want to have a filter that can pull text from the browser and if forbidden text is found, it replaces it...How would I go about doing this? First, get the data you're going to be putting in the browser. If it is coming from a website then you can use world/Export to do this. An example: var/http[] = world.Export("http://www.byond.com") Next, start filtering out text. Example of this: mob/verb/ReplaceStuff() And then display the text to the person, done with browse() usr<<browse(X) And there you go. EDIT: Oh, a side note. If you're saying pull text out of an entry box that the user typed in you'd have to find a way to grab the info yourself. There are some libraries used for character creation that use browsers, so that would be a good place to look for examples of how that would be accomplished. |
Of course, neither will attempting to filter the internet.