<div class="col-xs-12">
    <a class="twitter-share-link social-media-link"
    href="https://twitter.com/intent/tweet?text=Join%20us%20in%20{{ year }}%20for%20{{ subdomain_title }}%20In%20Libraries!&amp;url=http://{{ subdomain_raw | replace('_','--') }}.inlibraries.com">
    <img alt="Share on Twitter" class="social-media-icon twitter-share-icon" src="{{ url_for('static', filename='assets/social_media/twitter_white.png') }}" /></a>

    <a class="fb-share-link social-media-link"
    href="https://www.facebook.com/sharer/sharer.php?u=http://{{ subdomain_raw | replace('_','--') }}.inlibraries.com">
    <img alt="Share on Facebook" class="social-media-icon fb-share-icon" src="{{ url_for('static', filename='assets/social_media/fb_white.png') }}" /></a>
</div>

<div class="col-xs-12">
    {% set twitter_share_text %}Join us in {{ year }} for {{ subdomain_title }} In Libraries!{% endset %}
    {% set share_url %}http://{{ subdomain_raw | replace('_','--') }}.inlibraries.com{% endset %}
    <a class="twitter-share-link social-media-link"
    href="https://twitter.com/intent/tweet?text={{ twitter_share_text | urlencode }}&amp;url={{ share_url }}">
    <img alt="Share on Twitter" class="social-media-icon twitter-share-icon" src="{{ url_for('static', filename='assets/social_media/twitter_white.png') }}" /></a>

    <a class="fb-share-link social-media-link"
    href="https://www.facebook.com/sharer/sharer.php?u={{ share_url }}">
    <img alt="Share on Facebook" class="social-media-icon fb-share-icon" src="{{ url_for('static', filename='assets/social_media/fb_white.png') }}" /></a>
</div>

Manage encoding text and urls for sharing better
Manage encoding text and urls for sharing better
