Skip to content

Conversation

BurningTreeC
Copy link
Contributor

This makes it possible to find tiddlers with base64 encoding using search:*:words[searchterm] for example

fixes #9246

The fix is not to break from the for loop but to continue if the field is text and the encoding is base64:

		for(var fieldIndex=0; notYetFound.length>0 && fieldIndex<searchFields.length; fieldIndex++) {
			// Don't search the text field if the content type is binary
			var fieldName = searchFields[fieldIndex];
			if(fieldName === "text" && contentTypeInfo.encoding !== "utf8") {
				break;
			}

fix:

		for(var fieldIndex=0; notYetFound.length>0 && fieldIndex<searchFields.length; fieldIndex++) {
			// Don't search the text field if the content type is binary
			var fieldName = searchFields[fieldIndex];
			if(fieldName === "text" && contentTypeInfo.encoding !== "utf8") {
				continue;
			}

…inue

This makes it possible to find tiddlers with base64 encoding using `search:*:words[searchterm]` for example

fixes TiddlyWiki#9246
Copy link

netlify bot commented Aug 14, 2025

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit 5c545f5
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/689d5f5f1b41c200089e01ed
😎 Deploy Preview https://deploy-preview-9247--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md)

Copy link

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2537.6 KB

Diff: ⬆️ Increase: +0.0 KB

@pmario
Copy link
Member

pmario commented Aug 14, 2025

Nice catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] search:*:words doesn't find binary tiddlers e.g. application/pdf

2 participants