Blogger Enclosure Links: Extracting Dynamic Values Without JavaScript After Recent MIME Type Validation Update

17 views
Skip to first unread message

Manu Kumar

unread,
Jun 24, 2026, 8:17:42 AM (2 days ago) Jun 24
to Forum Blogger Ambassade Francophone

I'm using Blogger Enclosure Links to store custom metadata (price, version, sales count, etc.) inside the post editor. 

Previous Behavior

Previously, Blogger allowed arbitrary values in the MIME Type field, for example:

Link: http://sales.blog

MIME Type:

420 or 4.5$

and I could simply display:

<data:enclosure.mimeType/>

which returned:

420 or 4.5$

Code:
<b:loop values='data:post.enclosures' var='enclosure'><b:if cond='data:enclosure.url in {&quot;https://discount.blog&quot;,&quot;http://discount.blog&quot;}'><b:eval expr='data:enclosure.mimeType'/></b:if></b:loop>

Recent Blogger Update

Recently Blogger started validating the MIME Type field and now only accepts values in MIME format:

hello/text or application/xml or custom/value

Numeric values or plain text are rejected.

For example:

420 or 4.5$ or 1.4.5

are no longer accepted.

So I currently test:

420/12 or  4.5$/4 or 1.4.5/4

and:

<data:enclosure.mimeType/>

outputs:

420/12 or 4.5$/4 or 1.4.5/4

but I want:

420 or 4.5$ or 1.4.5

without JavaScript.
Screenshot 2026-06-24 at 17.43.20.png


Current Code: <b:loop values='data:post.enclosures' var='enclosure'> <b:if cond='data:enclosure.url == "http://sales.blog"'> <data:enclosure.mimeType/> </b:if> </b:loop>

Things I Have Already Tried String functions

These do NOT work: "abc".split("/") "abc".substring(0,2) "abc".slice(0,2) "abc"[0] "abc".charAt(0)


URL parsing

I also tried storing values in URLs: https://discount.blog?ref=420 https://sales.blog/420 https://version.blog?v=1.4.5

and tried: data:enclosure.url.params.ref data:enclosure.url.path data:enclosure.url.query

but none of them work.


Confirmed Working OperatorsString properties <b:eval expr='data:enclosure.mimeType.length'/> <b:eval expr='("abc").length'/>Contains operator<b:eval expr='data:post.enclosures any (e => e.url contains "sales.blog") ? "Yes" : "No"'/>Collections and Lambdasfilter() map() first() count() any() all()URL operatorsdata:view.url appendParams { utm_source: "blog" }Arithmetic, comparisons and ternary+ - * / % gt lt gte lte ?: and or

Unsupported Features

These all fail: split() substring() slice() replace() charAt() startsWith endsWith matches


Question

Is there any undocumented Blogger V3 operator or expression syntax that can extract the part before / from:

420/12 or 4.5$/4 or 1.4.5/4

or extract query parameters from: https://discount.blog?ref=420

without using JavaScript?


Manu Kumar

unread,
Jun 24, 2026, 3:22:11 PM (2 days ago) Jun 24
to Forum Blogger Ambassade Francophone
I find a solution, but it's limited to one time use per post like if I want 445 number, i cannot use it show more number likes 343 somewhere in post.

Then i will use Add Link Box:
https://sale-a-4.com
https://sale-b-4.com
https://sale-a-5.com

MIME type: (anything like): text/html

And in theme:
<b:loop values='data:post.enclosures' var='enclosure'><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-0.&quot;'>0</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-1.&quot;'>1</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-2.&quot;'>2</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-3.&quot;'>3</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-4.&quot;'>4</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-5.&quot;'>5</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-6.&quot;'>6</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-7.&quot;'>7</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-8.&quot;'>8</b:if><b:if cond='data:enclosure.url contains &quot;sale-&quot; and data:enclosure.url contains &quot;-9.&quot;'>9</b:if></b:loop>
Reply all
Reply to author
Forward
0 new messages