- Home
- Windows XP
- Customize
- Using the "A word or phrase in the file" search criterion may not work for HTML files
Using the "A word or phrase in the file" search criterion may not work for HTML files
Symptom
When I search for a specific text inside .html files, the Search Results shows only 2 files. I enter *.html for Search for files or folders named, and I typed src= for Containing text field. "Look in" shows the folder I originally selected.
Under Search Options, Date, Type, and Size are not checked. Under Advanced Options, only Search Subfolders is checked. When I click the Search Now button, the results show only two files. I know I have over 200 HTML files in this folder that contain at least two instances of the text src= in each such file. I get similar incomplete results searching for other text strings in these files.
Resolution
Windows XP uses the HTML filter (nlhtml.dll) for HTML file types, which ignores comments and other tags in HTML files when searching. To circumvent the problem, you may use a plain-text search filter rather than default HTML search filter. To do so, use the following steps:
- Click Start, Run and type Regedit.exe
- Navigate to the following key:
HKEY_CLASSES_ROOT\.html\PersistentHandler
- Backup the key by exporting it to a REG file
- Double-click (Default) and set its Value Data to {5e941d80-bf96-11cd-b579-08002b30bfeb}
- Close Registry Editor.
You may repeat the above steps for .htm file types (the following branch) if you want:
HKEY_CLASSES_ROOT\.htm\PersistentHandler
Related Links
If you enjoyed this post, make sure you
subscribe to our RSS feed!
We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?

