<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="215464" data-post-id="215464">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mhanberg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mhanberg/120/17162_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mhanberg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Expert LSP Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Internally, slots are represented as a function, so that is why it was saying it the Safe protocol isn’t implemented for type Function.</p>
<p>I actually have some protection against this tho with regard to rendering attributes, but it seems it doesn’t currently apply when you don’t pass any list literal.</p>
<p>I opened an issue for this: <a href="https://github.com/mhanberg/temple/issues/132" class="inline-onebox" rel="noopener nofollow ugc">[bug] Don't render the inner_block assign when building element attributes · Issue #132 · mhanberg/temple · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="215464" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/temple-html-dsl-for-elixir-and-phoenix/23940/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-215464" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="215464"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #31"></div>
  </section>
</div>
    <div class="postbit" id="215527" data-post-id="215527">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mhanberg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mhanberg/120/17162_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mhanberg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Expert LSP Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, I think this actually work as expected. What you were experiencing is when the <code>live_redirect</code> function trying to compile the attrs. you’ll have to make sure that don’t passthrough the inner block key yourself in that case.</p>
<p>This is because it compiles to</p>
<pre data-code-wrap="html"><code class="lang-html">&lt;%= case assigns[:disabled] do %&gt;
  &lt;% true -&gt; %&gt;
    &lt;span &lt;%= Temple.Parser.Utils.runtime_attrs(splat(assigns)) %&gt;&gt;
        &lt;%= Temple.Component.__render_block__(@inner_block, {:default, %{}}) %&gt;
    &lt;/span&gt;
   &lt;% _ -&gt; %&gt;
      &lt;%= Phoenix.LiveView.Helpers.live_redirect(splat(assigns)) do %&gt;
        &lt;%= Temple.Component.__render_block__(@inner_block, {:default, %{}}) %&gt;
      &lt;% end %&gt;
&lt;% end %&gt;
</code></pre>
<p>as you can see, the splat passed to the span is run through a temple function that will filter out :inner_block, but that can’t happen when you pass the splat to live_redirect. So, you will have to change the Map.delete call in your code snippet to account for :inner_block</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="215527" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/temple-html-dsl-for-elixir-and-phoenix/23940/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-215527" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="215527"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #32"></div>
  </section>
</div>
    <div class="postbit" id="215530" data-post-id="215530">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="soup" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/soup/120/31425_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  soup
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That makes sense.</p>
<p>I was considering passing my assigns to <code>Temple.Parser.Util.runtime_attrs()</code> to avoid any future dropbears, but it returns a string, and smells like a private API.</p>
<p>I wonder if a designated <code>clean_attrs_keys</code> or something would be good (or <code>map_to_attrs_list(map()) :: keyword()</code>). I.E:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def splat(assigns) do
  assigns 
  |&gt; munge_etc()
  |&gt; Enum.into([])
  |&gt; Temple.clean_attributes_keys()
end
</code></pre>
<p>Not sure how common the splat pattern is. It’s very useful for wrapping standard phx stuff but I doubt I would want to take on the maintenance burden if I were writing Temple.</p>
<p>I will probably just extract splat into it’s own module and note where to check for keys I should be dropping if something breaks.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="215530" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/temple-html-dsl-for-elixir-and-phoenix/23940/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-215530" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="215530"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #33"></div>
  </section>
</div>
    <div class="postbit" id="215576" data-post-id="215576">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mhanberg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mhanberg/120/17162_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mhanberg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Expert LSP Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>I was considering passing my assigns to <code>Temple.Parser.Util.runtime_attrs()</code> to avoid any future dropbears, but it returns a string, and smells like a private API.</p>
</blockquote>
<p>Yes, do not use that function <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20">.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="215576" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/temple-html-dsl-for-elixir-and-phoenix/23940/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-215576" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="215576"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>