# Double replacement of output buffer content

**URL:** https://community.mp3tag.de/t/double-replacement-of-output-buffer-content/66196
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [October 8, 2024, 6:15pm UTC](https://community.mp3tag.de/t/double-replacement-of-output-buffer-content/66196 "2024-10-08T18:15:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![yorickausyps](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yorickausyps](https://community.mp3tag.de/u/yorickausyps)
#### Post date: [October 8, 2024, 6:15pm UTC](https://community.mp3tag.de/t/double-replacement-of-output-buffer-content/66196/1 "2024-10-08T18:15:46Z")

</div>

Since Mp3tag v3.23 a new feature for developing tag sources has been implemented and documented, it says "You can reference contents of output buffers via `%output%` in all string parameters". I have used this new feature in my scripts very often and it proved to be very useful. But today I detected a behaviour of it, that is not intended and therefore I think is a bug.  
Consider this example:

```auto
outputto "Test"
say "This is a Test of the new feature!"#
outputto "Result"
say "%Test%"

```

What would you expect to see in Result?  
We get the following output:

```auto
output["Test"]= "This is a Test of the new feature!"
output["Result"]= "This is a This is a Test of the new feature! of the new feature!

```

As you can see, the Name "Test" of the output buffer is also contained in the output buffer text. The reference to the content of the buffer gets evaluated two times, first via "%Test%" and then again triggered by the word Test in the content of the buffer again. This second replacement is neither intended nor useful, because I never can be able to know in advance, which **words** an output buffer may contain, that happen to be identical to the **name** of this buffer.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [October 10, 2024, 2:19pm UTC](https://community.mp3tag.de/t/double-replacement-of-output-buffer-content/66196/2 "2024-10-10T14:19:30Z")

</div>

Thanks for reporting! I've fixed the issue with [Mp3tag v3.27c](https://community.mp3tag.de/t/455).

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [November 9, 2024, 2:20pm UTC](https://community.mp3tag.de/t/double-replacement-of-output-buffer-content/66196/3 "2024-11-09T14:20:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
