I use LWP::Simple to fetch a certain page on the internet.
The page contains:
<html>
• geavanceerd zoeken • voorkeuren • taalhulpmiddelen het web doorzoeken zoeken in <br><br>5 records -><br>the code
</html>
As you can see • occures in the code.
I wrote a script that searches for a user defined character/word in the stored page using the grep command.
It works fine, though it's giving me trouble when the user want's to search on the numbers 8,2 or 6.
This is because when I view the fetched page in html mode the • code is changed into dots, so the numbers 8,2 and 6
shouldn't be found by my script. Though it does, since my code takes a look at the stored html file.
(I only want to show the user defined characters/words that are present in html mode)
Is there a way to let the script read out the fetched page in html mode or do I need to store the fetched page in an other way ?
I've tried to encode the page, but that didn't do the job since it escapes special characters with an backslash. In case of
• only & would be escaped.
How to work around this ?
The page contains:
<html>
• geavanceerd zoeken • voorkeuren • taalhulpmiddelen het web doorzoeken zoeken in <br><br>5 records -><br>the code
</html>
As you can see • occures in the code.
I wrote a script that searches for a user defined character/word in the stored page using the grep command.
It works fine, though it's giving me trouble when the user want's to search on the numbers 8,2 or 6.
This is because when I view the fetched page in html mode the • code is changed into dots, so the numbers 8,2 and 6
shouldn't be found by my script. Though it does, since my code takes a look at the stored html file.
(I only want to show the user defined characters/words that are present in html mode)
Is there a way to let the script read out the fetched page in html mode or do I need to store the fetched page in an other way ?
I've tried to encode the page, but that didn't do the job since it escapes special characters with an backslash. In case of
• only & would be escaped.
How to work around this ?